MENU

How I Publish to WordPress and Medium Simultaneously — Without Sitting Up

Last week I published four English articles to both WordPress and Medium in a single session. I never sat up. I never touched a keyboard. An AI controlled my browser, called APIs, and typed into editors — while I gave instructions from bed through my phone.

This isn’t a hypothetical workflow. This is what I did yesterday. Here’s exactly how it works.


TOC

The Problem: Publishing Is Physical Labor

Writing an article is one thing. Publishing it is another.

For WordPress alone, the steps are: log into the admin panel, create a new post, paste the content, set the category, configure the slug, add meta descriptions, set the featured image, preview, and publish. Each step requires clicking, scrolling, and navigating — all on a computer screen.

Now multiply that by two platforms (WordPress + Medium), four articles, and add formatting differences between the two. That’s easily three to four hours of desk work.

I have a herniated disc. Sitting at a desk for more than 30 minutes causes pain that lasts for days. Three to four hours of desk work isn’t uncomfortable — it’s medically impossible.

So I built a system where AI does the publishing while I lie flat.


The Three-Phase System

Phase 1: Write in Markdown, Convert with Python

Every article starts as a Markdown file. I dictate the content using voice input (SuperWhisper on iPhone), and an AI (Claude) structures it into proper Markdown with headings, paragraphs, and formatting.

The key rule: never ask AI to generate HTML directly. AI-generated HTML is unreliable — missing tags, inconsistent formatting, broken structures. Instead, I use Python’s markdown library for mechanical, predictable conversion:

Voice input → AI structures into Markdown → Python converts to HTML

This separation matters. The creative work (writing) stays with AI. The mechanical work (HTML conversion) stays with code. Each tool does what it’s best at.

Phase 2: Push to WordPress via REST API

Here’s where most people would open the WordPress admin panel and start clicking. I don’t.

WordPress has a REST API — a way to create and update posts by sending data directly, without touching the admin interface. My AI (Claude’s Cowork mode with a Chrome extension) executes JavaScript in the browser to call this API.

The workflow:
1. Navigate to the WordPress dashboard (the API authentication token lives here)
2. Send a POST request to create a new draft with title, content, slug, and category
3. Verify the response — check the assigned post ID and slug

One article takes about 10 seconds. Four articles take under a minute. No clicking. No scrolling. No admin panel navigation.

The biggest gotcha I discovered: slug conflicts. If a slug already exists (even in the trash), WordPress silently appends "-2" or "-3". The fix is to check for conflicts first, delete old drafts that are blocking the slug, then retry.

Phase 3: Import into Medium via URL

Medium doesn’t have a public API for creating posts. But it does have a hidden gem: the "Import a story" feature.

The process:
1. Make sure the article is published on WordPress first (not just a draft — Medium needs a live URL)
2. Go to medium.com/me/stories and click "Import a story"
3. Paste the WordPress article URL
4. Medium imports the full content — H2 headings, bold text, tables, paragraph formatting, all preserved perfectly
5. Fix the title: Medium appends your site name with a non-breaking space character. Delete the appended text manually
6. Set tags, schedule, and publish

This replaced my earlier approach of typing content directly into Medium’s editor using document.execCommand('insertText'), which looked like it worked but silently lost data (see Mistake 5 in the section below). The URL import method is faster, more reliable, and produces better-formatted articles.


What This Looks Like in Practice

Here’s the actual sequence from my last publishing session:

Step Time Who did it
Voice-dictate 4 articles ~2 hours (over several days) Me (voice) + AI (structure)
Convert Markdown → HTML 30 seconds Python script
Create 4 WordPress drafts via API ~1 minute AI
Fix slug conflicts ~2 minutes AI
Publish on WordPress + Import to Medium via URL ~3 minutes AI
Fix Medium titles + set tags & schedule ~5 minutes AI
Review all drafts ~15 minutes Me (phone)
Total publishing time ~12 minutes AI: 95%, Me: 5%

The two hours of writing happened over multiple days — a few voice sessions here and there. The actual publishing — getting content from files into both platforms — took about twelve minutes of AI work while I watched from bed.


Why Two Platforms?

WordPress is for SEO — long-term search traffic that builds over months. Medium is for discovery — the platform’s recommendation algorithm shows your articles to readers who wouldn’t find your blog otherwise.

The strategy: full articles on WordPress (your own domain, your own SEO equity), and the same articles on Medium for distribution. Medium readers who want more click through to your site.

Publishing to both used to mean double the work. With this system, it means one extra command.


The Mistakes That Took Months to Figure Out

This workflow looks clean now. It wasn’t always.

Mistake 1: Asking AI to generate HTML. Early on, I asked Claude to write the HTML directly. The output was inconsistent — sometimes missing closing tags, sometimes adding unnecessary divs. Switching to Python’s markdown library fixed this permanently.

Mistake 2: Not checking for slug conflicts. My first batch of WordPress uploads all got "-2" appended to their slugs because old placeholder posts were occupying the original slugs. Now I always check and clean up before uploading.

Mistake 3: Trying to do everything in one browser tab. WordPress REST API authentication (the "nonce" token) only works on the admin dashboard page. I wasted time trying to call the API from the theme customizer page, which doesn’t have the right token. Lesson: always navigate to /wp-admin/ before any API calls.

Mistake 4: Using async JavaScript patterns. Chrome’s extension returns undefined for async functions. Switching to .then() chains with results stored in window variables solved this.

Mistake 5: Typing content directly into Medium’s editor. I initially used document.execCommand('insertText') to programmatically type content into Medium’s rich text editor. It looked like it worked — the text appeared, the page showed "Saved." But when I checked the drafts later, all four articles were nearly empty. Medium’s editor had silently failed to save the content. The error "Something is wrong and we cannot save your story" appeared intermittently. This was the most frustrating bug: invisible data loss.

Mistake 6: Not discovering Medium’s "Import a story" feature sooner. The fix for Mistake 5 was embarrassingly simple. Medium has an "Import a story" button on the Stories page. You paste the URL of a published article, and Medium imports the full content — including H2 headings, bold text, tables, and paragraph formatting. Everything I’d spent hours trying to replicate through browser automation was handled perfectly by a single URL import. The only manual step: Medium appends your site name to the title (with a non-breaking space character that resists normal string replacement), so you need to fix the title afterward.

The lesson: Always publish to WordPress first, then import from WordPress to Medium via URL. Don’t try to type content into Medium’s editor programmatically — it’s unreliable and the data loss is silent.


Who This Is For

If you’re running a blog and publishing is eating hours of your time, the REST API approach alone will save you significant effort — even without the AI automation layer.

If you have physical limitations that make desk work painful or impossible, this entire system works from a phone screen. Voice dictation for content, AI for structure and publishing, manual review on mobile.

If you’re curious about what AI browser automation actually looks like in practice — not the marketing version, but the real version with bugs, workarounds, and limitations — this is it.

The tools exist now. The workflow is buildable. The barrier isn’t technology — it’s knowing the specific sequence of steps. Now you have them.


Written by Ryo — publishing to WordPress and Medium from bed since 2025. This article was structured with AI assistance (Claude). All content reflects my own experience.

Read next:

Let's share this post !
TOC