Previous I’ve made a brief introduction about what should be on a server that hosts WordPress and other sites.
After many years of working with WordPress and other CMS software I understood that 3rd party tools like CloudFlare or other accelerators are the last options to think about in case of huge amount of traffic (really huge, I mean over 25k unique visitors per day).
So lets start with the basics.
In case you have an old WordPress install, a good starting point would be to export/import your content to a fresh install. This will make sure you have clean files, all unneeded files from upgrades are gone and would make sure your security it’s at a better level. It’s not hard to do this, as WordPress is intended for fast installs, easy import/export etc.
To have the site URL transparent used, you can use this settings in wp-config.php.
Another important thing to speed up WordPress is to limit how many plugins you use. I know you want all those shinny and fancy things that knock your preferences, but think if this really are liked by your visitors. 99% of them don’t like them, so stop using them and delete them. As the user can focus on your content and aren’t annoyed by those stupid share and subscribe features, more they will be enjoying to come again. Not those stupid things make user come back, the good quality code is the reason.
So WordPress with only a bit of help from some plugins works decent fast.
Next, crucial, is the theme you use. I know that 80% of you, readers of this post, aren’t web developers or experienced web designers in WordPress or other cool web apps. So it’s important when you choose a theme to be aware of how “heavy” it is. If you are going to download a free theme or buy a premium one, check all things you can read about it and google for other opinions about it. You may be surprised of how many free and even premium themes are very bad quality, they are just looking nice for your eyes. Remember, security and performance are a huge thing for your site, so try to step away from subjective opinions. If you find a really cool theme, but find out that it has really bad code in it, you may pay a good WordPress developer to make a custom version for you, there are lots of good themers, but may cost a bit.
I’m recommending themes from ThemeForest as they have a team of WordPress experts that check each theme. From there you may go to the other market places like for GraphicRiver or PhotoDune for great assets you can use on your site, cheap and really good quality.
With themes, even with good quality ones you may have troubles on one of the next steps.
Next step of optimization can be achieved two ways. Decent speed improvement by using W3 Total Cache with some good configured settings (depends on what the host limits you, so stay away from stupid shared hosting with bad limits – most “Unlimited” ones). Alternative, really huge improvements are by optimizing for your WordPress installation can be done on the servers config (if you have access), exactly in your vhost configuration. First, .htaccess option must be disabled and all rules need to go in here. I use common config files for WordPress and only call them with Include statement in all vhosts I need. This is a nice boost, because if you have .htaccess settings those are read for every client connection (for each file called – that’s a pain). Imagine this on “unlimited” shared hosting where they are hosting even up to 10k sites on a little server.
So, you got read of .htaccess, good, you won’t see improvements as you refresh pages, but when you have some traffic, it’s making difference. Good, now, HTTPD and Nginx can use a great module made by Google, called PageSpeed. This one needs some customization, as even some of the WordPress JS and CSS files from wp-admin are bad written and cause problems. So to skip headaches, I’m making PageSpeed to skip anything from those folders globally. Some great features that PageSpeed does (better then CloudFlare or other 3rd party tools) is that is combines and minifies JS and CSS files better then any other tool out there – it’s f**king Google we are talking about here so don’t pretend you are smarter then them. Using this feature will make you see if you are using a theme with bad css/js. And a nice thing, any known JS/CSS file from their CDN, the path is changed to use the CDN, nice thing, cuts a bit from your server’s load. This things can be achieved even with W3 Total Cache and externalize them to S3 or other CDN 3rd party tool, but I prefer to have everything on my side and let S3 to handle the big stuff, like videos, audio files and big images.
After all this optimizations, if more is needed, you may go with CloudFlare, CloudFront or other accelerators. Personally, I’m using my own alternative to this services with Varnish + HTTPD with PageSpeed and scaling to more servers if needed. Other mention, as I had been forced by the custom taste of some clients to use CloudFlare, I discovered that the free version is doing more damage then improvements in some cases.
Many would not know how to handle this stuff, but there are already specialized services that do this stuff or alternative solutions that they found to work. Cool services are from WPENGINE, PAGE.LY, SINTHESIS, ZIPPYKID. But you still need to get a bit dirty on your hands for many stuff.
If you really aren’t that good Web Developer with big SysAdmin experience to administrate your own VPS or dedicated server, best is to find a guy like this and negotiate with him for custom hosting. This would be the best solution, but not for those very cheap on money. Great things, trustful people costs, so if you are generating money from your “online business” or monetize your blog, be ready to split some of the profit to people that would boost your site.
Coming next is High WordPress Security Tips. Stay tuned and subscribe!