WordPress with APC

I updated APC from 3.0 to 3.1 because it totally locked my webserver, it was making it accept HTTP connection but never give any reply.

I had some problem accessing the WordPress 3.0 (latest SVN version) admin interface after that upgrade :

1
Fatal error: Call to undefined function wp_dashboard_setup() in /home/sites/clairambault.fr/florent/wp-admin/index.php on line 15

the bad line is :

1
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');

I just found out here it was because I activated APC with the “apc.include_once_override” option set to 1. If you encounter the same problem, just set it to 0 or change the include by something without the ABSPATH constant like for instance :

1
require_once('./includes/dashboard.php');

Note : requiring local files with “./” makes you save some CPU time.

I personally chose to change the wp-admin/index.php file because I didn’t want to reduce the performance of the other applications (I haven’t done any benchmark of the performance difference though).

3 thoughts on “WordPress with APC”

Leave a Reply

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