Issues after wordpress sites restore to new ispconfig

Discussion in 'Installation/Configuration' started by rajbps, Jan 27, 2024.

  1. rajbps

    rajbps Member

    Hi Team,

    I have installed a new ispconfig install on debian and restored 2 wordpress websites and their db. Unfortunately only the main page work and it you click on any of the other pages, it throws up 404 error.

    I am unsure where to look at this point.

    its ispconfig with nginx
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely, you missed configuring Nginx for WordPress. Unlike Apache, Nginx requires a special config for most CMS systems incl. WordPress as Nginx does not understand the rewrite rules that most CMS have in .htaccess files. E.g for WordPress, you must add this into the Nginx directives field of the website in ISPconfig (its on the options tab of the site) to enable permalink URL's:

    Code:
    location / {
                    try_files $uri $uri/ /index.php?$args;
           }
    
           # Add trailing slash to */wp-admin requests.
           rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
           location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                    expires max;
                    log_not_found off;
           }
     
    ahrasis likes this.
  3. rajbps

    rajbps Member



    Thank you that did the job
     

Share This Page