Fix WordPress Comment Fatal Error Util_PageUrls.php on line 527

Updated on: October 15, 2016
,

Recently I updated few of my WordPress plugins to the latest version after core WordPress update. The update was successful but later on I used to get many comments on my different articles and not able to see those comments in my email. So I tried to approve it from my WordPress dashboard but when I tried to approve it , it was always giving me internal server error like below

Fatal error not found in wp-content/plugins/w3-total-cache/Util_PageUrls.php on line 527

I thought it's due to some caching issue at backend so I tried to approve comments from frontend comment system but that also leads to similar error like below when you try to approve and reply to any pending comments.

[box type="warning" icon="warning"]Fatal error: Class ‘W3TCstdClass’ not found in /wp-content/plugins/w3-total-cache/Util_PageUrls.php on line 527[/box]

 Solution to FIX Comments approving error in WordPress:

wordpress-fix-fatal-error-w3tc

If you are coder then the above error clearly indicating issue related with W3TotalCache plugin. I opened Util_PageUrls.php file from Plugins->Editor->W3TC->Util_PageUrls.php and found that '/' is missing in line where its showing an error.  So below is a simple solution to fix it.

1. Navigate to wp-content/plugins/w3-total-cache/Util_PageUrls.php either using FTP or WordPress plugin editor.

Look for "$GLOBALS['post'] = new stdClass()" which is at line number 527

2. Replace it with  $GLOBALS['post'] = new stdClass();  & save file.

3. Now approve & reply to all your comments without any error or issue.

Note: Before making any changes we strongly recommend you to take WorpressDataBackup as changing in codes may lead towards downtime of your site.

Let us know in comment section  if you still face any problem with it. We are happy to solve it from our end.

wordpress-fix-fatal-error-w3tc
Post Tags: #comment error wordpress #fatal error wordpress total cache #wordpress troubleshoot
Saurabh Mukhekar
Saurabh Mukhekar is a Professional Tech Blogger. World Traveler. He is also thinker, maker, life long learner, hybrid developer, edupreneur, mover & shaker. He's captain planet of BlogSaays and seemingly best described in rhyme. Follow Him On Facebook

Leave a Reply

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

  1. Very detailed information to fix WordPress fatal error. It is a fact that WordPress is quite simple to use, but there are so many common WordPress errors which are not easy to solve and can make you panic.

0 Shares
Share via
Copy link