Support: 1-800-961-4454
1-800-961-2888

Importance Of Caching Your WordPress Site

5

There are several things happening on your server that can become bottlenecks as traffic increases to your site. The first bottleneck will be retrieving the data from your MySQL database. The second is trying to execute the PHP code that will ultimately display the content of your site to your end users. New sites with a small amount of traffic might not see these bottlenecks, but as traffic to your site goes up, the efficiency of your server will go down. Standing up additional servers can solve this problem but can be an expensive solution. This is when caching becomes important.

Learn more about the good news of installing WordPress on Cloud Sites with just one click through the Rackspace control panel.

The object of caching is to store dynamically generated data in a static format so you can retrieve that data again without further processing. Since WordPress is an application that calls a database to retrieve content for your users, caching your content is a helpful way to speed up the performance of your server.

There are several plugins that can help you with caching your WordPress site. The BatCache plugin, along with the MemCached Object Cache plugin, is what WordPress.com uses to cache all its sites. It is a proven and simple plugin that will most likely work with your site. This solution is best if you are running a WordPress config on multiple dedicated or cloud servers.

If you are using something like shared hosting to run WordPress, you might want to look at something like WP Super Cache or W3 Total Cache. These options don’t take advantage of memcache or APC, but instead use static file caching. There are benefits to static file caching, namely you don’t have to invoke PHP to grab the data out of the caching mechanism, but rather deliver it directly from the disk to further cut down the load on the server. However, if you have more than one server in your WordPress Configuration, file caching doesn’t work that great since you are keeping two copies of the cache.

Even though your site might not have a huge amount of traffic right now, it is best to prepare for a growing user base by implementing a caching strategy as soon as you can.

Previously, Matt talked about three tips for selecting a WordPress plugin and check the following post where he explains the benefits of using a Content Delivery Network to serve up your larger media files and some plugins that can help you do it. Learn more about how Rackspace can help you with hosting your WordPress site.

About the Author

This is a post written and contributed by Matt Martz.

Matt Martz is a Senior Linux Systems Engineer working in Rackspace Enterprise, specializing in high performance web serving. Matt is also a Contributing Developer on the WordPress project.

Follow Matt on Twitter at @sivel or on his blog.


More
  • http://halfelf.org Ipstenu

    W3 Total Cache can take advantage of APC, actually, or memcache :)

  • http://cmsadgroup.com Susan

    Hi Matt,
    We have one cloud server with Rackspace, 80gb, 2048mb & it will ultimately host about 25 individual WordPress sites. We are in the process of migrating them now. We would prefer not to use the WP Super Cache or W3 Cache plugins. Would your 1st suggestion of Batcache & Memcached Object Cache work for our setup as it is only one cloud server?
    Thanks
    Susan

    • Matt Martz

      Susan, yes it will work with a single server. There are no restrictions to running memcached on a single server and you will still get the same benefits. Using that architecture will also give you the ability to easily expand to additional servers and continue to use the same technologies.

      Just be careful to read the instructions for those plugins as the operate and are installed differently than most plugins.

  • http://cmsadgroup.com Susan

    Thanks Matt,
    We really appreciate the tips & advice.
    Best
    Susan

  • Russ

    We have a new site that is setup on Rackspace… a managed cloud server, a database server and a load balancer. Which Cache setup should work best there? Thanks!

Racker Powered
©2014 Rackspace, US Inc.