XCache and eAccelerator WP Plugins Updated

We’ve just finished uploading the latest versions of our XCache and eAccelerator plugins, now at version 0.6.

For those of you that missed the initial announcement, we’ve written two plugins that let WordPress communicate directly with memory-resident opcode PHP variable caches that are used in XCache and eAccelerator to boost performance and decrease I/O activity.

eAccelerator and XCache are the two most-popular open-source opcode caching engines for PHP, and we highly recommend that any and all hosts use them to improve PHP performance by several folds. In particular, we recommend XCache for best performance.

The update to the WordPress opcode caching plugins brings a very important stability/reliability update to the table, especially for those of you running PHP as a multi-threaded (worker_mpm, PHP as ISAPI, PHP as NSAPI, etc.) extension to your application server (which isn’t recommended with PHP!).

Aside from preventing future memory-access violation errors and heap corruption, version 0.6 fixes a minor bug that would incorrectly report that eAccelerator is installed and ready for opcode caching when it actually wasn’t.

Download XCache for WordPress v0.6

Download eAccelerator for WordPress v0.6

[bug tracker] [support forums] [XCache] [eAccelerator]

NeoSmart Technologies uses and recommends XCache as the PHP opcode caching engine of choice for best performance, uptime, and stability.

  • Similar Posts

    Craving more? Here are some posts a vector similarity search turns up as being relevant or similar from our catalog you might also enjoy.
    1. XCache and eAccelerator Plugins for WordPress
    2. File-Based Extension to the WordPress Object Cache
    3. Getting WordPress Super Cache to Run on a Windows (IIS or Apache) Server
    4. WordPress 2.5 and the Object Cache...
    5. eAccelerator PHP Extension Isn't Thread-Safe…
  • 48 thoughts on “XCache and eAccelerator WP Plugins Updated

    1. Thanks for this – I’m on Apache w/ mod_apache (yes, I know, I’ll be leaving it soon! and wtf is the point of mod_apache being so damn easy if it doesn’t work (in mpm_worker mode)!!?!?!) and I was getting some heap corruption with XCache php extension when using this plugin.

      Now it’s gone!! ๐Ÿ™‚   

    2. An excellent bit of code!  I was actually getting ready to write my own script to utilize the var cache in XCache and this just saved me some time.

    3. The APC one is already there. See the download page.

      But I don’t know why you’d want to use APC – like everything else produced/maintained by PHP themselves, its performance isn’t anything to write home about, especially compared to XCache and eAccelerator.

    4. Great work!  I have been using XCache for a number of months now and it works wonders with wordpress, and of course other PHP sites.

       I can’t wait to use your plugin to help even more.  One one, make sure people have their Variable Cache enabled ๐Ÿ™‚  I have 2x 128mb of Opcode Cache, but 0mb of Variable (as I never needed it before).


    5. Trying it out on WordPress MU, and apart from the fact that Apache2 segfaults after a few hours of running it, I can no longer access the Site Admin part of my WP Admin panel. It seems to have cached the privileges of a normal user, and not my own. Deleting object-cache.php magically makes the Site Admin button appear again.

    6. Well, I haven’t tested it with WPMU, perhaps I’ll get a chance sometime in the near future, but no guarantees. Pretty sad I guess, seeing as the highest concentration of heavy-load servers is most likely WPMU users in the first place ๐Ÿ™‚

    7. Well thanks for the interest, and if you ever want to get on my WPMU server to test anything out, I’ll be happy to give you an account.

    8. Actually, I just confirmed that this is not a problem with your plugin. Even with your plugin disabled, but XCache enabled, Apache still segfaults after a few hours. I suspect a memory leak somewhere.

    9. That’s just PHP being a bitch.

      I assume you’re using worker_mpm? PHP doesn’t work properly in multi-threaded environments, despite what they say. Honestly, PHP was never made for anything other than CGI deployment, and FastCGI throws PHP a lifeline.

      PHP doesn’t thread right, no matter what you do or what extensions you use, though PHP will tell you otherwise. In 3 years of self-hosting PHP, we found the only reliable high-uptime method to be either CGI or FastCGI – *sapi, mpm_worker/mpm_threaded are no go.

      Most likely you’re running mpm_worker, you’ll need to switch to mpm_prefork and sacrifice the huge performance difference in order to have stable PHP uptime.

      PHP may be a great language, but it’s implentation sucks… on both Windows and Linux.

      We dealt with the last of the memory corruption (segfault) bugs in the XCache/eAccelerator plugins with this version, under heavy load-testing for extended periods of time (24 hours+ of non-stop load) without a problem.

    10. Nope, it’s prefork.

      jeremy@ubuntu-www-2:~$ dpkg -s apache2-mpm-worker
      Package `apache2-mpm-worker' is not installed and no info is available.

      jeremy@ubuntu-www-2:~$ dpkg -s apache2-mpm-prefork
      Package: apache2-mpm-prefork
      Status: install ok installed

      Like I said, it happens even without your plugin (XCache running, but no WP integration). I think I’ll have to pursue this with the XCache community (if there is one).

    11. hi, im using wordpress mu in blogmas.com. I have using eaccelerator for 3 day and i happy with it because i help me reduce server load by more than 100%.

      Today i install your eaccelerator plugin and everything is okay. So how i can confirm that your plugins doing the work?

      thanks for the great plugins.

    12. adar, what I did was I edited the plugin near the top, where it has the following:

      include_once(ABSPATH . WPINC . '/cache.php');

      Change it to:

      { error_log('Oh no! If you see this, the cache plugin isn\'t working!'); include_once(ABSPATH . WPINC . '/cache.php'); }

      After that, load a few pages, and look in your PHP error logs. If you see the message “Oh no! If you see this, the cache plugin isn’t working!” anywhere, you’ll know it’s not working.

    13. I think I’ll add that to the next version, or perhaps have it echo it as an HTML comment, maybe.

      Jeremy, you can stop Apache from having a segfault if you run PHP in an “isolation” layer, like using the FastCGI or FastCGId modules.

      That way, if a PHP process dies out, it’ll be silently replaced and Apache won’t even know anything happened.

      The Apache FastCGI plugin is great, but more or less dead. Here’s the fcgid module: http://fastcgi.coremail.cn/

      mod_fcgid — an alternative FastCGI module for Apache2

      mod_fcgid has a new process management strategy, which concentrates on

      reducing the number of fastcgi server, and kick out the corrupt

      fastcgi server as soon as possible.

      mod_fcgid is binary-compatible with mod_fastcgi so your existing fastcgi

      programs do not need to be recompiled.  mod_fcgid supports suEXEC.

    14. I’ve installed the xcache for wordpress v0.6 version in my WP 2.3.1’s wp-content\plugins directory and it doesn’t show up in the plugins screen in admin to enable this.  Any idea why?  (This is on Win2003 – Apache – XCache 1.2.1)

      XCache is working on a vbulletin forums that I have installed on the same machine.




    15. It’s not a real plugin in that it doesn’t show in the plugins administration interface.

      This is because it’s stored in /wp-content/ and not /wp-content/plugins/

    16. Is anyone using eAccelerator with this plugin? XChache sounds good but my host supports installing eAccelerator for free and at this point, installing Xcache is probably a bit beyond my experience.

    17. Hi,

      Firstly, thanks for the excellent work with this plugin. I’ve been trying to get my dedicated server to run faster with multiple WordPress installs. Given that I didn’t know what apache meant until a few weeks ago, I’m doing OK – I got Xcache working after a couple of hours pissing about. I have one question about this plugin for wordpress though:

      How do I tell wordpress to use the plugin? – That is, does simply dropping the object-cache.php file (with my auth details therein) into wp-content do this on its own? If so, how? If not, as I suspect, I’ll have to tell it using WP-Config where this cache info resides – how do I do that?

      Correct me if I’m wrong, its just that, after today’s not uncommon trials and tribulations, it seems a little easy just to add this file et voila, it works – how does WordPress know to use it without me going in and defining this file??

      Thanks for your help.


    18. Rob, WordPress 2.1+ will automatically search for object-cache.php, and if it’s found WP will take care of the rest. It really is as simple as dragging-and-dropping the file and then you’re set ๐Ÿ™‚

    19. More than just a little ๐Ÿ™‚

      To the best of my knowledge, caching has been *ATM* removed completely from WP 2.5.
      But once you install these plugins, it’ll be back like before.

    20. right.. memory based now and it seems (i`ve tested some hours ago..) that it`s the same speed as using xcache object-cache.. can someone agree? i`m not sure about my tests this morning (too less coffee..) and there are guys out there who have really skillz about that.. after all, 2.5 is really running great and the final should convince a lot people in my mind.. ๐Ÿ˜‰

    21. All right, I installed the latest XCache version under WordPress 2.6.1. Now it appears to really speed things up noticeably without need for WP Super Cache, but it has some minor side effects in the WP Dashboard. The main ones include:

      1. Failure to display a listing for scheduled posts. It worked before this plugin was installed.

      2. Display of bogus “draft” messages.

      3. Display of bogus Comments waiting messages.

      This is minor in the scheme of things, but can you look at this?

      Gene Steinberg

    22. Hi Gene,

      We’re aware of the issues you mention and have an update available that addresses them which we’ll be releasing soon. We’ll announce the update here on the blog when it’s ready, so just hang in there! ๐Ÿ™‚

    23. This past week, I updated to a server that has eAccelerator installed, so I’m now interested in ongoing updates to that plugin. What’s the status?


    24. Hello Mahmoud,

      I have a CentOS 5 LAMP server which has x-cache installed. I run several PHP sites running PHP scripts as user apache on the server, and these work with caching. I also run some Joomla 1.5 sites on the server under FCGId, running as the user, and these also are fully able to take advantage of Xcache for page, var and mysql query caching.

      None of my wordpress 2.6 or 2.7 sites seem to work with your xcache plugin when running under FCGId, however.

      Do you have any information on the correct way to accomplish this? Do the PHP scripts have to be running owned by apache?

      Thank you for your work.

    25. XCache has a different cache for each instance of the PHP interpreter. With FCGI, each PHP process is a separate instance with a separate cache.

      Here at NST we use FCGI as well – basically, each request to the same process uses the cache from previous sessions on the same process. But requests to different processes do not share cache information.
      This is a limitation in the XCache implementation, the last I heard they had no intention of solving it.

    26. This may seem silly, but I have to ask. On a small blog site, which doesn’t push the server’s resources, how can you tell that the plugin is set up correctly and doing its job?

    27. I found out I couldn’t upgrade from Wordpress 2.7.x to 2.8 while the object-cache.php was used. Wordpress kept complaining I should upgrade the database, but the setup wouldn’t upgrade the database.

      I haven’t re-enabled it since I’m on to 2.8, but I would like to. Anyone tested XCache with Wordpress 2.8?

    28. Jeroen

      I am running Xcache with this under wordpress 2.8.2. I am not sure if this plugin is the cause, but it is causing a delay in the login. If I login and try to do something right away in the admin, I get the login screen again. If I wait 30-60 seconds, then it seems to stabilize and I can start posting or whatever.

      And my sites do seem to be quite a bit faster. I can live with the login irritation.

    29. @Jason – you can use what is known as “Apache Benchmarking” if you are on apache – just Google that and find out the commands required, then load one of your blog’s pages a couple of thousand times at once. Do it with the plugin off first, then install and activate and run again – the difference should tell you everything you need to know.

      However, I have been known to be wrong before about far simpler things, so don’t be angry if I missed something out in the above ๐Ÿ˜‰

    30. I’m using the XCache plugin on an fresh WP 2.8.6 site and encounter several problem with the whole plugin system. Some plugins sometimes reappear after removal and (automatic) installation of new plugins is impossible! After removal of the XCache plugin everything works again. XCache version is 1.2.2-3 from Debian Lenny stable branch.

      Any ideas?? But please no suggestions for upgrading Debian version to an unstable branch!

    31. I receive this after putting the xcache file plugin in wp-content

      Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /home/…/public_html/wp-content/object-cache.php on line 108

      What does it mean ?

      I have xcache enabled in my site and also wp-super-cache.

    32. I realize this is an older release and before going into testing it on my server can I get confirmation from anyone if this is still working properly with latest LAMP / WordPress?

      Thanks in advance!

    33. We had a big issue with Xcache – while settings var mem limit to more than 32MB, the box started to swap and after 4-8 hours is was completely down. If you have the same problem, try to lower maximum memory to 32 or less, and it should be much better!

    34. Hello everybody i need some help here.
      i’m trying to install mediawiki, im newbie with this. so i installed php5 with xcache 2.0.0
      but when i try to continue with my wiki installation. i got a warning.
      Warning: Could not find APC, XCache or WinCache.
      Object caching is not enabled.
      . i checked my info.php and i saw xcache enabled.
      Sry about my english ๐Ÿ˜›

    Leave a Reply

    Your email address will not be published. Required fields are marked *