Nginx-Apache combo with WordPress

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you about Nginx-Apache combo with WordPress:

It looks like I have neglected to write a new article in quite a while! Shame on me. But, thanks to a website outage, I’ve finally got some more good stuff to share with you.

My previous Nginx configuration became a nightmare to maintain and WordPress had become slower because Apache’s children were being killed by OOM. This was due to a  misguided PHP cache (PHP XCache to be precise) that decided to take every available bit of memory from my system, despite having max-requests per child set low (before it was purged).

This, along with my endeavors in seeking the fastest solution to everything and the introduction of a new Cloud servers by OVH, lead me to today’s article.

Setup nginx and wordpress on VPS

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Setup nginx and wordpress on VPS:

First easy thing is to use Ningx instead of Apache for the web server. This may or may not be an easy thing to do – if you need (or prefer) to stay with Apache, Patrick McKenzie has some good advice on how to avoid Apache crashing and burning under load on a small VPS.

On the other hand, if all you’re using Apache for is mod_php (PHP) and mod_rewrite (clean URLs), it’s pretty easy to switch. It’s gotten a lot easier recently when PHP FastCGI Process Manager got included in the PHP mainline, finally giving PHP proper support for FastCGI. Since it’s a fairly new addition, depending on your operating system, you may have to compile php-fpm yourself, or already have it available in packages.

Install NGINX, WordPress and php-fpm on Debian

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Install NGINX, WordPress and php-fpm on Debian:

Manual compiling is cool, but also a bit old-school, that’s why we use packages from Dotdeb in this example:

  1. Add the following two lines into your /etc/apt/sources.list file (example for debian squeeze, see lenny instructions here:
    deb http://packages.dotdeb.org stable all
    deb-src http://packages.dotdeb.org stable all
  2. fetch and apply GnuPG key:
    wget http://www.dotdeb.org/dotdeb.gpg
    cat dotdeb.gpg | sudo apt-key add -
  3. refresh your sources
    apt-get update

Speed up WordPress with Nginx

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Speed up WordPress with Nginx:

Recently I’ve wondering whether it was worth trying to improve my WordPress-based blog performance. While it wasn’t particularly terrible, waiting over 2 seconds just to load a single page isn’t exactly stunning.

I took a typical approach and installed the WP Super Cache plugin. Page loads dropped down to ~1 second. Much better, but there must be some more performance gains to be found somewhere without modifying the WordPress source code itself.

Inspired by this post by Mark Maunder I decided to see if I could shoehorn WordPress into a similar reverse proxy/persistent process mould. So far, it works brilliantly.

With the following tweaks I managed to go from 12 requests/s to over 30 requests/s on the same hardware – a single 256MB Rackspace Cloud server – whilst reducing latency from ~2 seconds to an average of only 0.4 seconds.

Use WordPress + W3 Total Cache with Nginx

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Use WordPress + W3 Total Cache with Nginx:

Want to use W3 Total Cache’s Minify on your WordPress blog which runs on NginX? No problemo. I faced the same problem at first but couldn’t find much info digging around, so I decided to take a look at W3 Total Cache’s rewrite rules and took some time to write them for my NginX configuration.

Install WordPress on Nginx with PHP-FPM

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Install WordPress on Nginx with PHP-FPM:

If you’ve followed my guide on setting up Nginx, Ruby, PHP on Ubuntu you might be wondering what to do next. How do you setup a PHP based site? For this example I’ll use the popular blogging software WordPress. This guide assumes you’re already familiar with DNS management and have a domain you wish to use pointed at your server.

As before I’ll be making use of the editor command. See the top part of the last guide if you don’t know what this is.

Redirect www domain to non-www with wordpress and nginx

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Redirect www domain to non-www with wordpress and nginx:

This is a quick tip post to show you how to redirect the www version of a domain to it’s non-www equivalent using Niginx.

The reasons for doing this are quite technically dense, so a knowledge of web hosting and SEO might be useful. Basically, having the same site available at both www.yoursite.com and yoursite.com means that there are two identical copies of your site on the web.

This is what’s called ‘duplicate content’, and can lead to your site being penalised by search engines. It’s a quick thing to remedy if you’re hosting your site with Nginx. You simply add a server block for the www.yoursite.com domain.

Nginx rewrite rules For WordPress

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you about Nginx rewrite rules For WordPress:

Hmm, so this had greatly frustrated me a few weeks ago, to the point I gave up and just let it stew on the backburner, hoping someone would blog about a solution.

As it turns out I did have the correct Nginx rewrite rules for WordPress; what I didn’t have originally was some of the necessary fastcgi parameters to make PHP work correctly (PHP pages were rendering so I figured everything was in order).

Install WordPress on WEMP

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Install WordPress on WEMP:

Nowadays, even desktop computers are powerful enough to run server software. For blog theme designers and plugin developers, this really benefits them because they finally can install an experimental server to play with.

WAMP system by far is the most popular blogging server for desktop computers. It takes advantage of Windows, Apache, MySQL and PHP which are also used in production environment, but more commonly run in Linux and UNIX setup.

While Apache is able to adopt to almost every situation, it is not ideal for servers with lower memory. Desktop computers which are going to be used as weblog server could make use of extra memory because the owners still run various applications on top of those workstations.

The idea behind this tutorial is to produce efficient blog server setup.

Not only can you claim back your precious computer memory, but it also results in a faster and more responsive windows blog server.

The whole setup takes advantage of open source blog server software. Nginx itself is licensed under BSD-like license, which basically means you can do whatever you want with it as long as you keep the copyright notice intact.

I am not a lawyer, so don’t take my words in the previous paragraph for legal decision.

Nginx Rewrite Rules for W3 Total Cache Plugin

August 20, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you about Nginx Rewrite Rules for W3 Total Cache Plugin:

We have been using nginx from long time to run our WPMU + domain mapping configuration for rtBlogs network.

 Recently when we decided to switch from Wp Super Cache to W3 Total Cache plugin, we were stuck while translating apache’s (.htaccess) rewrite rules to nginx configuration.

Now, after some efforts we managed to get nginx working with W3 Total Cache plugin with following rewrite rules.

Next Page »