• Resolved WP4TeePee

    (@wp4teepee)


    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 to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    The new editor requires the REST API to function.

    Are you using any security plugins to block the REST API?

    Thread Starter WP4TeePee

    (@wp4teepee)

    Hello @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

    (@macmanx)

    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

    (@wp4teepee)

    @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

    (@macmanx)

    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

    (@wp4teepee)

    @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.