As one of the most popular CMS platforms, WordPress can be configured for many uses. With the proper utilization of plugins and infrastructure, optimizing WordPress in a cloud environment can be easy. Below are a few tips to speed up your site and better your overall web score.
Disable Comments on Pages
.htaccess For compression and output filters
Compression by default is not utilized in a WordPress installation. You will see a drastic performance increase by adding the following lines of code to your .htaccess file. The following lines compression and also adds some output filters and expires headers that will overall better your sites performance.
In a load-balanced environment we highly recommend WP-Supercache to enable caching of your WordPress sites. The primary purpose of Supercache is to create a static HTML version of your pages so that you may lower your sites required resources by delivering a single static HTML page vs. a dynamic PHP page. While there are other caching plugins available, in load balanced environments such as Cloud Sites, we’ve found that Supercache provides the best performance.
Often overlooked, images are one of the main contributing factors to a slow site. It is best practice to save your images for web by exporting JPEGs out as progressive JPEGs. If you’re using Photoshop, choose Save for Web and set the image quality to 60%. This will cut the file size down significantly. If an image editing program is not available there is a wonderful plugin called EWWW Image Optimizer. The plugin will scan your media library and identify images that I can compress, and save as progressive JPEGs.
Caching to an External Server using Redis
Redis caching will bring a dramatic increase in site speed. Redis will take all the load off of the server/database by serving a single static HTML file to be served from a performance server. What makes this so great is the fact that you can run multiple sites off of a single server. A developer by the name of Benjamin Adams has a great resource on github for setting up Redis caching on WordPress sites specifically. If you have hundreds of customers in need of a caching solution, you can simply place in Benjamin’s index files, alter the credentials to match your Redis Server and load the site. On the initial load of a page, the index file will connect to the Redis server, create a static HTML file, and serve it on future loads. I recommend not setting this up until your site is completed because any changes to the site will require a flushing of the cache on the Redis server. This is a nice alternative to a staging environment because when logged in the WordPress admin panel you will be the only one seeing live changes on the site…those who are not logged in are being served the static HTML files on the Redis server.
For more information, read more here on what Cloud Sites by Rackspace can do for you!