Changing Wordpress Permalinks causes 500 Internal Server Error

Avatar
  • updated
  • Answered

When I choose the permalink option "Plain," my site functions as expected.

When I choose anything else, the links on my site change, but attempting to navigate to either the new (/$category/$postname) or the old (?post_id=123) links throws a 500 error.

I enabled Wordpress debug logs but nothing is showing up in the file.

The contents of my .htaccess file (in my subdomain's public_html directory) are

<ifmodule mod_rewrite.c="">
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?extinction-resilience.org$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?extinction-resilience.org$
RewriteRule ^(/)?$ wordpress/index.php [L] 
</ifmodule>
# 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

Folder structure:

/my main site/subdomain/public_html/wordpress/wordpress installation

I set up a rule in the Wordpress settings to remove the /wordpress from the URL and that works fine.

Avatar
IMH Support Agent 2
  • Answered

Hello Sam,

Sorry for the issues with the 500 error after a permalinks change.  The problem is most likely related to your .htaccess entries. Try removing those rewrite rules and testing the permalink changes without them in place.  If you're not seeing the 500 error, then that is the cause of the problem. I would recommend removing the entries in that case.  You mentioned wanting to remove "/wordpress" from the URL.  It appears that your site URL is the one that you want changed.  You can change this directly in WordPress so that it can handle not only that change, but your permalink change as well.  Follow the directions in this WordPress document on Changing the Site URL. Change the site URL and then try the permalink change once again. 

If you have any further questions or comments, please let us know.


Kindest regards,

Arnel C.