skip to Main Content

Tired of searching on the web without results so I end up here asking for help.

I am using Plesk to manage my server I activated PHP-FPM for Nginx and wanted start
Processing PHP by Nginx so I set up these options (picture below):


The Index page is working well because I add it in the setting as you can see on the
image The probléme is the Permanent link any link i click on i get
404 Not Found Nginx
When I turn off WordPress permalinks All work fine and when I switch back only
the home page work.

Any help pls !



  1. Chosen as BEST ANSWER

    Well, thank you guys for your help!
    By searching more in SO and some external forums, I was able to find a solution.

    Here are the steps how to add custom include in Nginx virtual host config:

    mkdir /usr/local/psa/admin/conf/templates/custom/domain
    cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/

    and edit the location code you have already with the following code:

    location ~ /$ { index index.php index.cgi index.html index.xhtml index.htm index.shtml; try_files $uri $uri/ /index.php?$args; }
    /usr/local/psa/admin/bin/httpdmng --reconfigure-all # to apply new configuration for all domains

  2. If your wordpress is at the root level this is all you should need to do for your location / block

    location / {
        try_files $uri $uri/ /index.php?$args;
    Login or Signup to reply.
  3. You must just insert in the “Additional nginx directives”:

     try_files $uri $uri/ /index.php?$args;

    Do not insert the "location / {" en de final "}"

    Login or Signup to reply.
  4. Hello guy’s I m pleased to tell you that i found better solution to fix this 404 Nginx error.

    You just need to download this extension : htaccess to nginx

    And go to your domaine -> Web Server Settings -> click on Show .htaccess converter -> Copy what u already have on your .htaccess in your ftp root -> then click
    convert to nginx.

    So it will convert it and past it in the Additional nginx directives field then save it and “Ta Da !!!!!”

    It s gonna be working Inchaalah without any security issue. our freind UFHH01 know what i m talking about.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top