Migrating from Apache to nginx
Here is an article for the ‘Do It Yourself’ers running your own WordPress installation on a LAMP stack web servers. Warning, not for the faint of heart…
Apache web-servers are used by 62.4% of all websites in the world but like Microsoft Word, it has a many many options but you only really need six. Nginx (pronounced “engine-ex”) is an ultra efficient, lightweight and popular web-server that does those six things really well, and it does five of them 50 times faster than Apache. It is especially good for static contents and are incredibly efficient in its memory requirements and resource management. It reduced your load average as well as CPU utilization by nearly by half making it ideal in a VPS environment.
In our opinion this is the future. It is incredibly stable, very fast and ultra efficient. Plus we’ve found nginx to be a lot easier to configure, with a more terse configuration file than Apache servers.
You can easily configure WordPress to run on nginx by following the steps in this article.
However there are some gotchas when migrating from a standard apache webserver installation over on to nginx. Here are some issues you might encounter and tips on what to do about them.
When WordPress detects that you are using FastCGI SAPI, redirections are sometimes ignored. I.e. 301 turn to quietly redirect code 302, which is not good for SEO.
WordPress includes checks for Apache mod_rewrite before enabling permalinks. This check will fail on nginx (since it does not use these modules), which can cause problems in the permalink structure.
You can try updating rules per this article to address these hurdles (somewhat difficult) or simply install the “nginx Compatibility (PHP4)” plugin to solve both of these problems and keep rewrites intact.
Another issue in the migration is the lack of .htaccess rules in nginx.
You can use the following service online which will automatically convert an Apache’s .htaccess rules to nginx configuration instructions.
http://winginx.com/htaccess
Now, with these tools in hand, you can run your WordPress installation as efficiently as WordPress.com itself, along with these other popular websites.
pinterest.com | Available on TrendsPro | ||||||
Full Profile | |||||||
wordpress.com | Available on TrendsPro | ||||||
Full Profile | |||||||
about.com | Available on TrendsPro | ||||||
Full Profile | |||||||
hark.com | Available on TrendsPro | ||||||
Full Profile | |||||||
whitepages.com | Available on TrendsPro | ||||||
Full Profile | |||||||
cnn.com | Available on TrendsPro | ||||||
Full Profile | |||||||
examiner.com | Available on TrendsPro | ||||||
Full Profile | |||||||
vimeo.com | Available on TrendsPro | ||||||
Full Profile | |||||||
coolmath-games.com | Available on TrendsPro | ||||||
Full Profile | |||||||
bleacherreport.com | Available on TrendsPro | ||||||
Full Profile |