• Hi,

    I get a 403 error if I try and post on my site any text containing a link (running 4.9.4). This error popped up after I updated to 4.9.4 although that may be coincidence, I haven’t posted for a while.

    I’ve re-applied permalinks rules, stripped down .htaccess, disabled all plugins. There are some hints from other posts that this can be down to mod_security rules on the server, which I don’t have access to, but I have applied this code to my htaccess with no effect.
    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>
    Does anyone else have any other ideas to try?

    Cheers,
    Mike

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter schmikester

    (@schmikester)

    Ps the 403 page I get says
    “Forbidden
    You don’t have permission to access /wp-admin/post.php on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.”

    I get no errors when the post doesn’t contain an ‘a href=””‘ statement. But I do always get the error when the link is there, even a blank one like that.

    • This reply was modified 6 years, 8 months ago by schmikester.
    • This reply was modified 6 years, 8 months ago by schmikester.
    • This reply was modified 6 years, 8 months ago by schmikester.
    • This reply was modified 6 years, 8 months ago by schmikester.
    Moderator t-p

    (@t-p)

    Also, have you tried:
    – switching to the unedited default Theme (Twenty Seventeen, etc.) for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins).
    If you don’t have access to your Dashboard’s Appearance page, access your server via FTP/ SFTP , or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding "-old" to the end of the folder name. Alternately, you can remove other themes except the default theme (Twenty Seventeen, etc.). That will force your site to use it.

    Also make sure you have proper role that can can write/edit posts.

    Thread Starter schmikester

    (@schmikester)

    Hi,

    Thanks for your reply. I’ve just tried switching to twenty seventeen and the behaviour is still present.

    Apologies I’m new to the forum and didn’t notice anything about roles in the welcome messages.

    Thread Starter schmikester

    (@schmikester)

    Just in case anyone else comes across this thread, I managed to persuade the hosting provider to disable mod_security on the server and then everything worked perfectly again, so that is the issue in this case.

    If you have a wordpress 403 and none of these options work:

    https://www.greengeeks.com/tutorials/article/the-easiest-way-to-fix-a-403-forbidden-error-in-wordpress/

    Then you might need to do the same.
    FYI, inserting the following into my .htaccess didn’t have any effect.

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    I think this might be because they were using mod_security2, which doesn’t allow modification via htaccess. So your only choice if so is to persuade the hosting provider to switch it off. Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘post.php 403 when in post’ is closed to new replies.