• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Nginx + non "plain" Wordpress Permalinks error.

I've duplicated this information from another post because I am sure more than one people will realize they had this dreaded option turned on by default without knowing it.

It should be working out of the box as long as you DO NOT HAVE THE CUSTOM ERROR DOCUMENTS enabled.

I've literally burn my head off trying to make it work until I found out that the "checkbox" for Custom Error Documents was enabled by default.

Be sure to disable Custom Error Documents from your website configuration (Hosting -> Custom Error Documents) (or subscription plans and sync).

They stated this on the update but they somehow neglect to mention the importance of this. If you have Custom Error Documents box enabled nothing will work (permalink wise) and you'll be forced to use custom rules.

They should seriously disable Custom Error Documents option automatically when NGINX ONLY configuration is present. So lame that they leave it like that for anyone to smash their brains trying to make nginx only works out of the box.

Advice to Plesk: State a warning on Custom Error Documents or have that option greyed out when NGINX is the only web server. Why would you want an option there enabled that basically breaks the webserver ?
"It should be working out of the box as long as you DO NOT HAVE THE CUSTOM ERROR DOCUMENTS enabled."

This did it for me.

Thank you!
 
This is a "just in case" for anyone else who comes across this thread in the future.

This sounded EXACTLY like my issue, and I was familiar with the "disable custom error pages" workaround, but that still didn't seem to resolve my issue.

After some further research, I came across this "WordPress websites on a Plesk server show "404 Not Found" when PHP-FPM by Nginx and Proxy Mode are used".

I attempted the first option, to switch back to "Switch PHP handler to "PHP-FPM served by Apache" (preferred workaround)", which also didn't resolve it.

Adding in the .htaccess and associated settings did ultimately resolve it on the one WP site with the issue.


Cheers, -Ian
 
Ian Saul - thanks for the information. I had the exact same problem.

Here is an even easier solution.
1) Switch to Apache FPM for PHP
2) Go into wordpress and change the permalinks settings one or more times. Press save - THIS will make an .htaccess file. Permalinks now work.
3) Switch back to Nginx and it all still works.

It seems like on a new plesk install, if you start with Nginx, then the htaccess file is never made. Nginx has an extension that I hear uses the htaccess file to create nginx settings from it. So that is how permalinks will work again.

I think that this is a bug in wordpress or plesk. The htaccess file needs to be there. If there is no htaccess file and you are in nginx mode, then changing the permalink setting will not make a new htaccess file.
 
Back
Top