• Resolved EveK

    (@evek)


    Hi everyone,

    Yesterday, I migrated a wordpress installation to a new server and new domain.

    I changed URLs with the “better search replace” plugin, copied files and database over to the new server, changes the config.php etc. and now the site itself works fine and is accessible. I’m also able to log into the admin backend and change, for example, the menu.

    The problem

    But whenever I try to save the permalink options (to create a fresh .htaccess) or one of the migrated pages or posts, or user settings, I get the 403 “server permission denied” error.

    If I create new pages and posts and edit them, there is no error. Only the migrated ones cause it.
    I can also install new plugins but I can’t delete any old ones that came with the migration. There is no error but it just says after a while: “couldn’t delete plugin … no response from server” (or something along the lines).

    Here’s what I already checked:

    • File permissions are fine (755 for folders, 644 for files)
    • Since I cannot create the .htaccess through the saving permalink option, I replaced it manually and it looks like it should…
    • Plugins are not the cause
    • mod_rewrite should be enabled on the server

    This is what the htaccess looks like

    # 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 have a strong feeling that it’s a permalink problem (?!) but I have no clue what to try anymore to fix it.

    Does anyone have an idea what else could cause this 403 error in my case and what I could do about it?

    Thanks!
    Eve

    • This topic was modified 7 years, 11 months ago by EveK. Reason: add htaccess code
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there @evek. If you are using cPanel as control panel at the actual host, I may suggest you check the error logs. You should find this option named as ‘Errors’ or ‘Error logs’. Check there to see if the 403 errors were logged.

    Another thing that you can try is to simply update your permalinks. Then to see if everything is working as expected.

    Thread Starter EveK

    (@evek)

    Thanks @chemicloud for the suggestion. I couldn’t find error logs from my hoster, it seems they don’t let me access them. But I found the problem anyway now. It was with the Apache server settings. I found two options that fixed it for me:

    First option:

    First I tried a suggestion from this blog (https://www.wpproblems.com/403-forbidden-error-fix-wordpress/) to disable some settings in mod_security that can cause false positives, by adding this to the .htaccess:

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

    this did indeed help and the error was gone. But I didn’t feel comfortable disabling security like this, so I went with option two.

    Second option:

    I found out that FollowSymLinks was disabled in the Apache server settings. The hoster I moved from had them enabled by default so I didn’t think about that with the new hoster. After I enabled this in my hosters options panel, the whole shebang worked again.

    So, in the end it was the server and not me, meh … ??

    • This reply was modified 7 years, 11 months ago by EveK.

    You are most welcome. Glad to hear that you have managed to sort this out. Take care and have a good one!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘403 permission error when saving pages and settings after migration’ is closed to new replies.