Home > Tutorials > Wordpress > How To Reduce WordPress Memory Usage
Permalink to How To Reduce WordPress Memory Usage

How To Reduce WordPress Memory Usage

by on 02.06.2010 | 10 comments

WordPress is the staple blogging application across the internet, but sometimes on a shared, or low memory server it can use too much memory. Here are my tips for reducing the amount of memory WordPress uses.

Small Disclaimer: WordPress itself doesn’t really use that much memory, the increase is normally noticed on established WordPress installs with plugins and themes installed.

Use A Caching System

One of the biggest memory hogs while using WordPress is actually PHP. All of the memory required to build your pages is used by PHP, which depending on the amount of SQL queries needed & plugins used can be upward of 20-30 MB. To stop the need to use that amount of memory every time a page is loaded the best thing you can do is install a caching plugin. The most well know ones are WP-Super-Cache & Hyper Cache. I have used them both & can recommend both as excellent caching systems.

If you are struggling to understand how a caching plugin will help, here is a little description. A caching plugin basically waits for a page to be loaded via PHP then takes a flat HTML copy of the page and loads that the next time someone wants to view it. It’s obviously more complicated than that, but that is the general idea behind it.

Limit Plugin Usage

One of the greatest things about WordPress is its extendability via plugins, but therein lies another of its problems. Using too many plugins can cause WordPress’ memory usage to go through the roof, so the best thing to do is use only the plugins you need. If you have any you don’t use any more, disable them. Go through ones you are using & consider if you really need them or not. This is not to say that every plugin does increase memory usage, but to the general WordPress user the best advice is to disable as many as you can.

For those that are WordPress savvy try disabling plugins that use a lot of MySQL queries, do heavy calculations, or place a lot of information in memory. If you find that some plugins are essential for the functionality of your site, keep them enabled & try to save memory in other places.

Google Gears

Something not many WordPress users consider is memory usage while you are in the admin. The amount of memory used when saving a post or even just loading a post for editing can be quite high sometimes. To keep memory usage low until you need to save a post/page etc you can try using Google Gears, or Turbo as WordPress calls it. You can enable it by installing Google Gears & then going to the Tools -> Tools in WordPress.

Unfortunately Gears is not compatible with FireFox 3.6 and it is currently unknown if Google plans to update Gears or not with the recent announcement that they are going to concentrate on developing offline file access for HTML5.

Any More?

Well those are my tips for saving memory, but it is by no means an exhaustive list. If you have any other tips please share them. I’d love to hear other ideas, and if you are ok with it, I’ll add them to this list. Also if anyone has any other tips on reducing the memory used in the admin I’m all ears.

WordPress logo © WordPress · Composite by Lisa Marie

Written by Paul Robinson

A Web coder in languages such as CSS, X/HTML, jQuery, but mostly PHP. Addicted to Girls Aloud, Jennifer Morrison, Carah Faye Charnow, TV Show Chuck, and completely in love with Yvonne Strahovski's smile.

Give something back!

If you LOVED this tutorial and would like to show your appreciation, please consider or a little something from our Amazon Wishlist.

Discussion: 10 Comments

  1. Feb 9th, 2010 @ 02:59:30

    Getting fairly tough to find a RELIABLE open source server these days! Thanks for the post! Fortunately, I found a GREAT company to use!


  2. Feb 9th, 2010 @ 03:13:31

    Yeah, I must admit it took a while for me to find the host I use now. I’m very happy with the service they give for the price. All of the software they use is open source & if My site does outgrow my hostingthey offer upgrades. :)

    I use DreamHost if you were wondering.


  3. Feb 22nd, 2010 @ 00:26:37

    Being knowledgable about the resources each plugin uses is very important. I wrote a plugin to help administrators monitor WP memory usage, CPU usage, security, settings, among other things. It’s great for finding out whether or not a plugin is resource-friendly. Other plugins only offer support for overall memory usage, whereas this allows WP admins to measure memory usage anywhere there is a filter or action.

    http://wordpress.org/extend/plugins/tpc-memory-usage/

    I hope you all find this useful!


    • Feb 22nd, 2010 @ 00:33:14

      Thanks for posting that Chris.

      It’s always nice to have more information. I think I might be turning obsessive compulsive about finding out how much memory I’m using etc, I don’t know if that’s a good thing or a bad thing. :lol:

      I will most definitely check out your plugin though. :)


  4. Apr 2nd, 2010 @ 04:46:27

    An alternative to reducing memory usage is to increase the memory limit! With the brand-new Cobalt WP Boost plugin, it’s now possible with just a couple of mouse clicks.

    Check it out here:
    http://frugaltheme.com/about/cobalt-wp-boost-plugin/

    As someone who uses a powerful framework theme with a couple memory-intensive but mission-critical plugins, I was starting to feel the memory crunch. WordPress’ internal Memory Limit is only 32MB, even in the beta release of WP 3.0. Since most servers nowadays allow much more than that, it makes sense to have a plugin that can give your site a little more breathing room when there’s just nothing left to optimize.


  5. Apr 3rd, 2011 @ 15:50:13

    Great info!i found this tips was help me to solve my problem,thanks!


    • Apr 3rd, 2011 @ 16:09:19

      Thanks Donny. Glad it was helpful. :)


  6. Apr 11th, 2011 @ 17:42:12

    actually what is the recommend total plugin to use it?? or it depend to blogger, or theme???


    • Apr 11th, 2011 @ 17:53:22

      The one I use at the minute is called W3 Total Cache and is a kind of mix between WP-Super & Hyper Cache. However I’ve heard good things about the new versions of WP-Super Cache. It’s down to which one you think sounds the best.

      WP-Super Cache (in my experience) is easy to set up. W3 Total Cache is harder, but had a lot more options.


  7. May 9th, 2011 @ 07:48:30

    Hey,Thanks for this ultimate list buddy.I really helped a lot.. :)


Leave a comment

Please enclose code in [lang] tags. For example [php] echo 'hello world'; [/php]

* Name, Email, Comment are Required