I have two WordPress websites on shared hosting under the same account, i.e. different folders on the same server. Permalinks work on one site but not on the other site. On the broken site I receive an apache server 404 error message when accessing pages other than the home page.

This is what I have tried so far to fix the broken permalinks:

  • Re-saved permalinks.

  • Deleted .htaccess file – then saved permalinks again. The .htaccess file is generated successfully on the server with this content:

    # 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 
    
  • Switched theme to Twenty Seventeen theme.

  • De-activated all plugins.

I don’t have access to the server to check the apache2.conf file for:

    AllowOverride All

But am I right in thinking that this should be set correctly because the permalinks are working correctly for one site?

Any other suggestions for what I could try / test to get this working?

Thanks very much!

1 Answer
1

It turns out it was a server issue after all.

Adding junk text to the .htaccess file should produce an error but it didn’t, indicating the .htaccess file wasn’t being read at all – https://docs.bolt.cm/3.4/howto/making-sure-htaccess-works

I had another look on the hosting console and there was an option to “Sync” the .htaccess file. This fixed it up.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *