Blogging Tutorials

Fix WordPress Comment Fatal Error Util_PageUrls.php on line 527

wordpress-fix-fatal-error-w3tc

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.

Saurabh
Saurabh Mukhekar is a Tech Blogger from Pune, India. 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
You may also like
target-email-marketing
Tips for a Successful Email Marketing Campaign
shared-HOsting
6 Top Benefits of Using Shared Hosting
3 Comments
  • filewells Sep 30,2017 at 4:16 pm

    awesome work . keeps going on your works is really good.

    • Saurabh Oct 2,2017 at 9:37 pm

      thanks hope your issue got resolved

  • Linda Jones Dec 28,2016 at 7:06 pm

    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.

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This