Best methods of Wordpress optomization

February 19, 2015 3.1k views

Ok, I'm setting up a few wordpress installs. I know there are all kind of optimizations that I could do:

1) Use Nginx instead of Apache
2) Use FastCGI
3) Install Varnish
4) Memcash or Reddis
5) Various plugins like WP Super Cache.
6) A bunch of stuff I probably haven't thought about yet.

In your opinion what would be the right mix or a good mix with minimal hassle. I KNOW you are going to say that depends on visitors, usage, plugins, etc. I don't have that info yet, as they will be new sites. They could only get a few people a day, they could go viral and I'd have to start throwing a lot of hardware at the problem. Most importantly, I want to learn from your experiences.

3 Answers

1) Use Nginx instead of Apache
2) Use FastCGI

If you can compromise the .htaccess feature of Apache go for Nginx + PHP-FPM. Or install Apache 2.4 with MPM_Event + FastCGI + PHP5-FPM.

3) Install Varnish
5) Various plugins like WP Super Cache.

Both Varnish and WP Super Cache do the same thing i.e., page caching so use any one of them. If using Varnish install the Varnish HTTP Purge plugin.

4) Memcash or Reddis

Neither if this is a single server. Install PHP APCu (package name php5-apcu). Install the WP-FFPC plugin to utilize PHP APC.

I would say it might be better to start simple, and add optimizations as needed.

Start with either Apache or Ngnix ..choose one and work with it. Each has pros and cons

Make sure your droplet has a swap:

Make sure your droplet is secure:

Change your login page from wp-login.php to something different.

Install a plugin like login lockdown

Make sure each site you set up is backed up on a regular basis

Do those things, and monitor each site. As traffic grows on a site, add things like caching and such. You might find some of your sites do not need that.

As with most things, the more components you add, the more possibility of issues popping up. Start simple, keep things "native", and add new features as you need.

by Justin Ellingwood
Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.

I used easyengine for my blog.

It's a script that help you to install wordpress.

I try WordPress + W3 Total Cache and WordPress + FastCGI Cache and in my experience Wordpress + FastCGI is 25% to 30% faster then WordPress + W3 Total Cache.

I used pingdom for my speed test.

Standard WordPress Sites

Command to install

wget -qO ee && sudo bash ee             # install easyengine
ee site create --wpfc                # install wordpress + nginx fastcgi_cache

Made 4 WordPress: Manage any number of WordPress sites. Support for multisite is already present.

Complete Setup: Install NGINX, PHP, MySQL, Postfix and dependencies in one single command: ee stack install

Config Optimization: It's automatically tweak your server config as per available hardware resources.

Caching Options: Use w3-total-cache, wp-super-cache & nginx’s fastcgi-cache. Supports Zend Opcache & Memcache too

Automatic Updates: Update EasyEngine for new feature with one simple command: ee update

Git-Backed Changes: All config changes are saved using Git so feel free to play with config!

I hope this will help you :)

Have another answer? Share your knowledge.