Websites and full-stack development for associations

Washington DC Metro

Philstack Blog

How to Solve 500 Error After Changing WordPress Permalink Setting

One little setting was changed, then errors - errors everywhere!

Picture this – it’s a sunny Sunday morning, you have a nice hot cup of coffee, and the conditions are near-perfect to do some website stuff!  You’re getting ready to launch your wonderful new WordPress site, and you decide you want to use a different Permalink structure.  

All of the sudden, your whole site is down!  Coffee spills all over your desk and lap.  Birds suddenly fly away and babies start crying.  In the distance, sirens… 

This is another article explaining how one particular situation was resolved.  I ran into an interesting scenario that may be helpful for someone else! 

Error code 500 that appears when you have a misconfiguration on your web server for some other generic issue.
Every page was showing the 500 error above.

If you’re running into the dreaded 500 error after changing the WordPress permalink structure, there are some well documented and thorough suggestions provided here:

It takes a village!  However, after reviewing these suggestions, I was still stuck.  The only work around was to *delete the .htaccess file* – and then it came back immediately if you tried to adjust permalinks again!  Ahhhh!!!

Finally found it: rewrite wasn't working.

Eventually, I found one more thing to check for in addition to what was suggested above: verify that your site is allowing rewrite.  

For my situation, the key suggestion actually came from step 3 on this post: https://gcore.com/learning/how-enable-apache-mod-rewrite/

The solution was to update the /etc/apache2/sites-available/{my.site.url}.conf file to use the setting AllowOverride All

Screenshot of the problematic setting
BEFORE - the AllowOverride setting is set to "AuthConfig".
Screenshot of the corrected setting
AFTER - the AllowOverride setting is set to "All"

Then, reset your web server services so the new setting takes affect.  For my Ubuntu machine, this was done via CLI and the sudo systemctl reload apache2 command.  

After completing these steps, my WordPress site was working beautifully once again!  I could also change the Permalink settings to my heart’s content without errors.  

How did this happen?

At some point, I must have set it to AllowOverride AuthConfig, which was sufficient for my purposes of setting up simple security via the .htaccess file.  However, this setting did not allow WordPress to complete it’s redirection when the Permalink setting was changed.