W3 Total Cache Version 0.9.2.8 Update Causing Fatal Error (Solution)

I wrote about W3 Total Cache 0.9.2.7 issue, which caused few issues including MaxCDN custom domain name not working. Frederick, the plugin author was fast enough to release updated version 0.9.2.8, but it caused a Fatal error like below, and here I will show a quick workaround to fix the issue.

Fatal error: Uncaught exception 'FileOperationException' with message '<strong>/public_html/wp-content/w3tc-config/master.php</strong> could not be created, please run following command:<br /><ul><li><strong style="color: #f00;">chmod 777 /public_html/wp-content/cache/tmp</strong></li><li><strong style="color: #f00;">chmod 777 /public_html/wp-content/w3tc-config</strong></li>' in /public_html/wp-content/plugins/w3-total-cache/inc/functions/activation.php:127 Stack trace: #0 /public_html/wp-content/plugins/w3-total-cache/lib/W3/ConfigWriter.php(159): w3_throw_on_write_error('/...', Array) #1 /public_html/wp-content/plugins/w3-total-cache/lib/W3/Config.php(71): W3_ConfigWriter->save() #2 /public_html/wp-content/plugins/w3-total-cache/lib/W3/CloudFlare.php(174): W3_Config->save() #3 /public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/CloudFlare.php(52): W3_CloudFlare->update_ip_ranges() #4 /h in /public_html/wp-content/plugins/w3-total-cache/inc/functions/activation.php on line 127

 

This error occurs when you try to do direct upgrade from an activated old version of W3TC. You dashboard will be completely inaccessible. Front end will be live, so normal visitor will be able to visit site as usual, but you can’t access dashboard. And as you had W3TC active, if you try to rename W3TC plugin folder it will cause a lot other issue, as your .htaccess and other setting is configured to serve using W3TC’s cache. And not only admin, nobody could even access login page.

Here is the solution

1. Log into FTP, or SSH or Shell or SCP or whatever process you use to access file directly
2. Comment out this “/wp-content/plugins/w3-total-cache/inc/functions/activation.php” on line 127
3. Now you could access Dashboad.
4. First thing first, Clean all cache from W3TC.
5. Deactivate W3TC from plugin section.
6. Remove that Comment out from “/wp-content/plugins/w3-total-cache/inc/functions/activation.php” on line 127.
7. Now reactivate W3TC, check setting, in generally you won’t need any customization.

You are good to go.

I posted this solution within few hour of the plugin version 0.9.2.8 release at WordPress.org support forum here, it seems it solved the issue for a lot of user.

Let me know your experience in the comments section below.

Leave a Reply

Loading Facebook Comments ...

1 Comment

  1. CaMaFiVe   •  

    Hi, thanks for your solution, now i’m having a different error in my site, could you please help me solve it?

    PHP Fatal error: Call to undefined function get_home_url() in /home/user/public_html/tripeomusic.info/wp-content/plugins/w3-total-cache/inc/define.php on line 617

Leave a Reply