Title: Publishing failed
Last modified: March 15, 2019

---

# Publishing failed

 *  Resolved [WP4TeePee](https://wordpress.org/support/users/wp4teepee/)
 * (@wp4teepee)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/)
 * Hi,
    I too get a ‘publishing failed’ error. With the classic editor plugin installed
   I don’t get an error but the new page does not publish i.e. I get a 404.
 * I’ve installed Health Check and it produces a few warnings but these don’t look
   serious:
    PHP Version 7.0.33 – For best performance we recommend using PHP 7.2
   or higher. PHP Extensions The optional module, libsodium, is not installer, or
   has been disabled. The optional module, imagick, is not installer, or has been
   disabled. REST API availability The REST API call gave the following unexpected
   result: (404)
 * I’m not sure what else to provide at this stage
 * I’d be grateful for any help.
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpublishing-failed-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11319406)
 * The new editor requires the REST API to function.
 * Are you using any security plugins to block the REST API?
 *  Thread Starter [WP4TeePee](https://wordpress.org/support/users/wp4teepee/)
 * (@wp4teepee)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11319882)
 * Hello [@macmanx](https://wordpress.org/support/users/macmanx/) (James),
 * As I noted in my original post:
    I receive the error ‘Publishing failed’ when*
   all* plugins are disabled I have installed the Classic Editor plugin and still
   get the error
 * I am not aware of anything else that would interfere with the REST API. I note
   also in the original post that Health Check displayed a REST API respons i.e.
   404 so I assume the api is working???
 * Thanks for responding to my post
 * Cheers
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11320168)
 * 404 means “not found” hence why Health Check reported it as “the following unexpected
   result.”
 * Is your sever running mod_security? If so, can you check again with that switched
   off?
 *  Thread Starter [WP4TeePee](https://wordpress.org/support/users/wp4teepee/)
 * (@wp4teepee)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11320280)
 * [@macmanx](https://wordpress.org/support/users/macmanx/) I have two WordPress
   sites on the same server. One works and the other doesn’t. And no, I don’t have
   modsecurity.
 * That all said, I think I’ve solved my problem. It looks like it was security 
   related and that Wordfence made changes to htaccess
    # Wordfence WAF <IfModule
   LiteSpeed> php_value auto_prepend_file ‘/home/orgchang/timpaul.com/wordfence-
   waf.php’ </IfModule> <Files “.user.ini”> <IfModule mod_authz_core.c> Require 
   all denied </IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from
   all </IfModule> </Files>
 * # END Wordfence WAF
 * # BEGIN WordPress
 * # END WordPress
 * I’ve now rebuilt htaccess
    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine
   On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   > # END WordPress
 * I can create posts and pages. I should mention, I still have the classic editor
   plugin enabled.
 * James, thanks for your help 🙂
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11321458)
 * If you aren’t using Wordfence, just remove this section from your .htaccess file:
 *     ```
       # Wordfence WAF
       <IfModule LiteSpeed>
       php_value auto_prepend_file ‘/home/orgchang/timpaul.com/wordfence-waf.php’
       </IfModule>
       <Files “.user.ini”>
       <IfModule mod_authz_core.c>
       Require all denied
       </IfModule>
       <IfModule !mod_authz_core.c>
       Order deny,allow
       Deny from all
       </IfModule>
       </Files>
   
       # END Wordfence WAF
       ```
   
 *  Thread Starter [WP4TeePee](https://wordpress.org/support/users/wp4teepee/)
 * (@wp4teepee)
 * [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11322318)
 * [@macmanx](https://wordpress.org/support/users/macmanx/), it wasn’t a section,
   that was all that was in the htaccess file 🙂
 * Anyway, I’m going to mark this closed and resolved. Thanks again James.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Publishing failed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [WP4TeePee](https://wordpress.org/support/users/wp4teepee/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/publishing-failed-3/#post-11322318)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
