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!
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:
- https://onesmartsheep.com/post/4-ways-to-fix-wordpress-permalinks-not-working-visual-guide
- https://www.elegantthemes.com/blog/wordpress/fix-the-500-internal-server-error
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.
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.