Tag: plugins

Working with Nginx: Permalinks & plugins

To coincide with the launch of the new site, I decided to move hosting service providers. There were several reasons why, but most notably the sheer determination to rid myself of being bound by contract with 1and1. Admittedly, they are one of the cheaper options around, but they have poor value to money ratio, poor customer service, inept staff and a painstakingly backwards user interface for customers . I could rant on for hours about them, but that was not the intention of this blog post.

In light of this move, I decided to experiment and see what Nginx had to offer; there has been a lot of buzz over the internet about its speed and efficiency in comparison to Apache. Since using it, I can agree it lives up to its reputation; more so for the fact it was so quick and easy to setup. I had a Ruby on Rails application and a WordPress installation running within ~30mins. Impressed. However, when everything looked all rosy red, I stumbled upon my first issue: permalink settings. After a few minutes of digging around, I ended up at the nginx.conf and declared a rewrite rule:

Permalinks are an important part of any WordPress site; to ensure clarity and common sense for the user experience. If we take a closer look at the code, line 5 will add a trailing slash to the */wp-admin requests. Anymore problems can usually be solved by looking at the Nginx log files, as your first point of investigation.

My final issue came about when I was trying to install a syntax highlighter plugin (I highly recommend Crayon Syntax Highlighter). I was being presented with FTP login details, which I can only assume was the authentication to store the new plugin files on the server. Ever since I started to use SSH, I’ve become ever increasingly sceptical about the utility and security of an FTP server. So after some tinkering, I discovered WordPress required the files on the server to have access rights by the server’s auto-generated user and not the root user. The auto-generated user for Nginx is www-data; a single command later, on my WordPress installation folder, led to success:

If you have any questions or queries, fire them down below.

08th September 2013