Nodes/comfyui_wordpress/SaveToWordPressNode
ComfyUI Node

SaveToWordPressNode

Publish a ComfyUI image to your WordPress blog in one click

By mohsensd1373·Created about a year ago·Updated about a year ago· 0
SaveToWordPressNode
  • image
  • BOOLEAN
titleSample Post Title
contentPost content text for WordPress
tagscomfyui,ai,sample
category
meta_data
positive_prompt
negative_prompt
seed0
steps0
cfg8.00
sampler_name
scheduler
denoise1.00
add_image_in_posttrue

The name tells you everything: this node takes the image your workflow just generated and drops it on your WordPress site as a live blog post. No export step, no drag-and-drop into the WP media library, no writing a post by hand. You run the graph, the image is on your blog before you've finished your coffee. For anyone running an AI-art blog or a portfolio site on WordPress, that turns your ComfyUI machine into a one-button publishing pipeline. Fair warning up front: this is a tiny, low-traffic custom node with zero community chatter behind it, and it has a couple of sharp edges - but the source is small, readable, and honest about what it does.

How it works

Under the hood it's just the WordPress REST API plus a bit of HTML assembly. The node:

  1. Reads your site URL, username, and password from wordpress_config.json (the file lives inside the pack's folder).
  2. Converts the incoming IMAGE tensor to a PNG and saves it as comfyui_output.png in your ComfyUI working directory.
  3. Uploads it to wp-json/wp/v2/media with HTTP basic auth.
  4. Resolves your tags and category against the site - it searches first, and creates them if they don't exist (a numeric category value is treated as a category ID).
  5. Builds the post body as HTML and publishes it via wp-json/wp/v2/posts, with the uploaded image set as featured media.

The node is marked OUTPUT_NODE, so it belongs at the end of your graph like a Save Image node, and it returns a single BOOLEAN - true if WordPress returned 201 and the post went live, false if anything along the chain failed. That's a pass/fail signal, not something you wire onward.

The inputs that matter

There are a lot of fields, but really only a handful you touch:

  • image - from your VAE Decode. The whole point.
  • title, content, tags - the post's headline, body text, and comma-separated tags. These are the only ones that shape what readers actually see.
  • add_image_in_post (default on) - whether the image is embedded in the post body. Either way it becomes the featured media, so leave it on.
  • positive_prompt, negative_prompt, meta_data - optional extras appended to the post, handy if you like showing your prompt in the post.

Now the trap that will confuse you the moment you look at the node: seed, steps, cfg, sampler_name, scheduler, and denoise look like KSampler inputs, but they don't control anything. The node doesn't sample at all. Those values just get rendered into a neat little "KSampler Settings" HTML table that's embedded in the post, so your readers can see how the image was made. They're documentation, not controls. Type them in or wire them from your actual sampler - but don't expect changing them to change the image.

Installing it

It's a normal custom node, no models, no heavy dependencies. The only non-standard import is requests, which ComfyUI already ships, so there's no requirements.txt drama to fight through.

ComfyUI Manager: search comfyui_wordpress, install, restart. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/mohsensd1373/comfyui_wordpress

then restart ComfyUI. Before it'll do anything, edit custom_nodes/comfyui_wordpress/wordpress_config.json:

{
  "wordpress_site_url": "https://your-site.com",
  "wordpress_user": "your-user",
  "wordpress_pass": "your-password"
}

Where people get burned

The shipped config file is prefilled with the author's own site URL (https://my-comfyui.ir) and empty credentials. If you skip the config step, your images upload to a stranger's WordPress - or, more likely, fail because empty credentials 401. Editing the file also means reloading ComfyUI; the README says as much.

Biggest real-world gotcha: the wordpress_pass is used for HTTP basic auth, and WordPress only accepts Application Passwords for that (since WP 5.6). Your normal account password will get you a 401 every time. Generate one under Users → Profile → Application Passwords and paste that in. Your user also needs a role that can upload media and create posts - Editor or Admin - or the API will turn you away. And there's no draft option: it publishes immediately, live, with status: publish. If something does fail, don't stare at the UI - check the terminal. The node prints status codes and WordPress's actual error text to the ComfyUI console, and that's where the answer always is.

For a one-person AI-art blog it's a genuinely useful little node. Just do the config properly, use an application password, and you'll forget the manual posting workflow entirely.

Categorycustom

Inputs (15)

NameTypeDefaultDescription
imageIMAGE
titleSTRINGSample Post Title
contentSTRINGPost content text for WordPress
tagsSTRINGcomfyui,ai,sample
categorySTRING
meta_dataSTRING
positive_promptSTRING
negative_promptSTRING
seedINT00–18446744073709550000
stepsINT00–18446744073709550000
cfgFLOAT8.000–100
sampler_nameCOMBO37 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +31
schedulerCOMBO9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
denoiseFLOAT1.000–1
add_image_in_postBOOLEANtrue

Outputs (1)

NameTypeDescription
BOOLEANBOOLEAN