keepcalculator

06 Numbers and Powers

WordPress Post by Email: WP.com & Self-Hosted Guide

Card No. 06·41067 · Updated · Standard formula, shown below

This guide shows you how to publish blog posts by sending an email, covering both WordPress.com hosted sites and self-hosted WordPress.org installations. You’ll learn how to set up the feature, configure your email address, and troubleshoot common issues.

What You’ll Need

  • A WordPress.com account (for hosted sites) or a self-hosted WordPress.org site with a domain and hosting.
  • Access to your WordPress admin dashboard (wp-admin).
  • A valid email account (the one you’ll send posts from).
  • For self-hosted: a way to edit your site’s files (FTP, cPanel File Manager, or a plugin like WP Crontrol) and a method to create a cron job if needed.

Step-by-Step

For WordPress.com Sites

  1. Log in to your WordPress.com account at wordpress.com and go to your site’s dashboard.
  2. Navigate to Settings → Writing (or “Writing� in the left sidebar).
  3. Find the “Post by Email� section. You’ll see a unique email address like youraccount@post.wordpress.com. This is the address you send your posts to.
  4. Copy that address and save it somewhere safe.
  5. Set a secret email address (optional but recommended): Click “Create an email address� or “Generate� to get a random one. This prevents others from posting to your site if they guess your address.
  6. Test it: Compose an email to the address you generated. Put the post title in the subject line, and the body of the email becomes the post content. Send it.
  7. Check your site: The post should appear as a draft (by default) in your WordPress.com dashboard. You can change this to publish immediately by going to Settings → Writing and selecting “Publish� under “Default post status�.

For Self-Hosted WordPress (WordPress.org)

  1. Enable the feature: Log in to your wp-admin dashboard.
  2. Go to Settings → Writing.
  3. Scroll to “Post via email�. You’ll see fields for a mail server, port, login, and password. This requires a dedicated email account (e.g., post@yourdomain.com) that WordPress can check via POP3 or IMAP.
  4. Set up the email account: Create a new email address on your domain (via your hosting control panel, like cPanel). Use a strong password.
  5. Fill in the settings:
    • Mail Server: Your email provider’s POP3/IMAP server (e.g., mail.yourdomain.com or pop.gmail.com if you use Gmail).
    • Port: Usually 110 for POP3, 995 for POP3 SSL, 143 for IMAP, 993 for IMAP SSL.
    • Login: The full email address (e.g., post@yourdomain.com).
    • Password: The password for that email account.
  6. Save changes.
  7. Set up a cron job: WordPress checks for email when someone visits your site, but that’s unreliable. You need a real cron job to fetch emails regularly. Add a cron command to run every 5 or 10 minutes, like:
    wget -q -O - http://yourdomain.com/wp-cron.php
    If you don’t have shell access, use a plugin like “WP Crontrol� to schedule the WordPress cron to run more often (set to every 5 minutes).
  8. Test it: Send an email to the address you set up. The subject becomes the post title, the body becomes the content. The post will appear as a draft (default) in your dashboard.
  9. Adjust default status: To publish immediately, add this line to your theme’s functions.php file:
    add_filter( 'wp_mail_post_status', function() { return 'publish'; } );
    Or use a plugin like “Post by Email� to control this via UI.

Common Mistakes

  • Using the wrong email address: On WordPress.com, you must use the exact address provided. On self-hosted, you must use the address you configured.
  • Not setting up a cron job: On self-hosted, if you rely on default WP-Cron, emails may be fetched only when someone visits the site, causing delays.
  • Email server settings are wrong: Using the wrong port or security type (SSL vs. no SSL) is the most common reason self-hosted setup fails.
  • Forgetting to change the default post status: Posts stay as drafts unless you change it, which confuses users who expect them to publish immediately.
  • Using a personal email that you also use for other things: This can lead to accidental posts or security issues. Use a dedicated email address.

Tips

  • Use a secret address on WordPress.com: It prevents spam posts.
  • Format your email with basic HTML: WordPress will render basic HTML tags like <strong> and <a> in the body.
  • Use categories and tags via email: On WordPress.com, you can add [category “News�] in the body to assign categories. On self-hosted, you can use the Category: and Tags: headers in the email (e.g., Category: News).
  • Test with a short post first: Send a simple “Hello World� email to verify everything works.
  • Keep your email account secure: Use a strong password and enable two-factor authentication if possible.

Troubleshooting

  • Emails are not being fetched: On self-hosted, check that your cron job is running. You can manually trigger it by visiting http://yourdomain.com/wp-cron.php in a browser. If that works, the cron job is the issue.
  • Connection errors: Double-check your mail server settings. Try using the same settings you’d use in an email client (Outlook, Thunderbird). If you’re using a free email provider like Gmail, you may need to enable “Allow less secure apps� or use an app-specific password.
  • Posts appear as drafts: This is default behavior. Change the default status or use the filter code provided.
  • Emails are marked as spam: Make sure the email is sent from the same address you configured. On WordPress.com, always use the secret address.
  • On WordPress.com, the email bounces: Ensure you’re sending to the exact address shown, including the domain @post.wordpress.com.
  • Self-hosted, but the email is never fetched: Check your server’s PHP error logs. Also, verify that the email account has messages in it (send a test email to it first).

Frequently Asked Questions

Can I use any email provider for self-hosted?

Yes, as long as it supports POP3 or IMAP. Most hosting providers offer email accounts, and you can also use Gmail, Yahoo, etc., but you may need to adjust security settings.

How do I set the post status to publish immediately?

On WordPress.com, go to Settings → Writing and select “Publish� under “Default post status�. On self-hosted, add the filter code to your theme’s functions.php or use a plugin.

Can I attach images to my email?

Yes, attached images are added to the post’s media library and inserted into the content. On WordPress.com, they appear as a gallery at the end of the post unless you place them manually.

Why is my email not being converted to a post?

Check that the email is sent from the correct address (for self-hosted, the one you configured). Also, ensure the email is plain text or simple HTML; complex formatting may cause issues.

Is there a limit on email size?

On WordPress.com, the email size limit is 10MB. On self-hosted, it depends on your server’s mail settings and PHP upload limits. Large attachments may fail.

Can I schedule a post by email?

Yes, you can set a future date in the email body using the Date: header (e.g., Date: 2025-06-01 10:00:00). This works on both WordPress.com (if you use the “Schedule� option) and self-hosted (if your email client supports it).

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →