How to enable WordPress permalinks using Webuzo and Nginx

If you are using WordPress on Webuzo with a LEMP stack, chances are you’ve had trouble with making the permalinks on your website work. Below is a tutorial on how to fix this in Webuzo and enable pretty URLs.

The first thing we’ll need to do is create a config file on the server. For this you can use SSH, file transfer or even the File Manager under Server Utilities in Webuzo’s Enduser Panel.

I like to put my custom configuration files under /home/user/myconfigs/ so I can easily find them, but you can pick any destination you want. In our chosen folder, we create the file or files that will be enabling pretty URLs on the server. You can have one common file across multiple websites, or if you require different configurations, you might have /home/user/myconfigs/type1.conf and /home/user/myconfigs/type2.conf

Inside the config file you’ll need the following code that is standard for enabling permalinks in WordPress on Nginx (thanks Soumik Ghosh).

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
}

Note the location attribute; if your WordPress installation is in a subfolder like /blog , you’ll need to create a separate file for that domain and alter the line as follows:

location /blog/ {

Now that we’ve created the configuration file(s), we need to navigate to Features > Extra Configuration and add them as records to our domains. Select the desired website and the Nginx server and paste the path to your config file; then click Add Record.

Webuzo Extra Configuration

If your WordPress permalink settings are correct, everything should start working straight away, even without the need to manually restart Nginx yourself. Enjoy your new beautiful URL functionality!