Tagged: W3 Total Cache Troubleshooting
-
AuthorPosts
-
April 22, 2021 at 4:22 am #36464Gary GuerreroGuest
Hello,
Just recently, I am unable to login to the Dashboard of my WordPress site. The email I received due to the feature in WP that detects fatal errors on my site said W3 Total Cache was the cause. I disabled the plug on the backend and then was able to login to WP. When I tried to activate the plugin in WordPress, I got an error message stating:
Plugin could not be activated because it triggered a fatal error.
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /home/afc/public_html/wp-content/plugins/w3-total-cache/UserExperience_Plugin_Admin.php on line
Does anybody know what the problem could be?
Below are the current specs:
WordPress version 5.5.4
Current theme: Action for Children (version 1.0.11) Current plugin: W3 Total Cache (version 2.1.2) PHP version 7.2.34April 22, 2021 at 4:24 am #36471Marko VasiljevicKeymasterHello Gary,
Thanks for reaching out, and for choosing W3 Total Cache.
As I’ve mentioned in wp.org https://wordpress.org/support/topic/w3-total-cache-prevents-me-from-logging-into-dashboard/
This suggests that maybe during the updated the mentioned file got corrupted somehow.
I would advise completely removing W3 Total Cache and re-installing:
1. Purge Cache
2. Deactivate and Delete Plugin
3. Check .htaccess File (make a backup)
W3TC will create many directives in the .htaccess file to control the caching behavior. Each section will start and end with comments like “#BEGIN W3TC Page Cache core” and “#END W3TC Page Cache core”.
Ensure that no residual entries are leftover in your .htaccess file after deleting the plugin.
4. Delete wp-content files and folders
– cache folder
– w3tc-config folder
– object-cache.php (if exists)
– advanced-cache.php (if exists)
– dbcache.php (if exists)
– upgrade folder
– delete w3-total-cache folder in wp-content/plugins/ (if exists)
5. Delete Cached Files from CDN (if using CDN)
Besides deleting all the relevant files, if you use CDN then ensure to purge the cached content from your CDN. This is necessary when you enabled minify option in W3TC settings. You should delete the minified and combined scripts and CSS files from your CDN server to avoid the site breaking on the browser.
6. Go to your wp dashboard and re-install W3 Total CacheThanks!
April 23, 2021 at 9:46 am #36536Gary GuerreroGuestThank you
When you say
4. Delete wp-content files and folders
– cache folderI see a cache.b folder. Should I delete that?
April 23, 2021 at 9:51 am #36539Marko VasiljevicKeymasterHello Gary,
Thank you for your question.
I am not quite sure what is thecache.b
folder. W3 Total Cache creates a /cache/ folder in wp-content, and within that folder, depending on the settings enabled, you may find sub-folders like /disk-enhanced/, /minify/, /object/ etc.
So possibly thecache.b
folder is from some other plugin or theme. You should check what the mentioned folder contains.
Thanks!April 23, 2021 at 9:59 am #36540Gary GuerreroGuestActually I remembered that while I was chatting with tech support at the hosting, they mentioned they renamed a folder to cache.b. Anyway, I followed your directions and successfully reinstalled the plugin.
Thank you for your help!
April 23, 2021 at 9:59 am #36543Marko VasiljevicKeymasterHello Gary,
Thank you for the information.
Glad to know the issue is resolved!
Thanks! -
AuthorPosts
- The topic ‘W3 Total Cache prevents me from logging into dashboard’ is closed to new replies.