Urgent: WordPress some pages showing 500 error, others not!

Matthew B
Matthew B used Ask the Experts™
on
Friend transferred a wordpress site to a new VPS, the new host is displaying SOME pages but not all pages.

For example /category/mypage works
but category/mypage2 returns 500 server error

Wp-admin works, so i dont htink its a database issue, i re created the htaccess file, no luck.

When i inspect the  broken page it says <!-- html is corrupted -->

They are using the wordpress fastest cache plugin, not sure if that helps (even though i look into the cache folder and not all the pages are in here? is it permissions? i set 777 temporarily on those folders but look slike Fastest Cache isnt loading those pages into the cache)


Any ideas other than corrupted pages one one page would return 500 server error?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Most probably indeed the cache plugin, so try to disable the plugin (just to test those error pages), and also try the full delete cache function, if it solves your problem or not.
Matthew BHack

Author

Commented:
Tried this.

No luck, still 500 error on thise pages.

Can we totally rule out database bc wp admin works ?

Commented:
You can rule it out, only if that page shows up correctly in the wp-admin pages.
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

David FavorFractional CTO
Distinguished Expert 2018

Commented:
To know the exact problem, simply enable WP_DEBUG in your wp-config.php file + likely the resulting debug.log data will be sufficient to fix the problem.

If this is insufficient, you may have to refer to your Apache or PHP FPM logs.
Matthew BHack

Author

Commented:
So weird we found issue was xml for php wasnt enabled. Didnt find any reference to this in apache logs or wp debug logs.

Would wp debug logs show php errors? Assume i would see an error in relation to the missing package but i didnt
David FavorFractional CTO
Distinguished Expert 2018

Commented:
When you have WP_DEBUG enabled, you should have seen some indication your XML couldn't be processed.

Look through your WordPress debug.log file carefully + you'll likely find something.

Keep in mind at the PHP-7.0 point, many modules moved out of PHP core into separate modules including - XML + MBstring + several others.

All these modules must be installed now, to provide all features core use to provide.
Hi,

Maybe for some reason it's just your .htaccess file in your public_html (or private_html in case of ssl).

Make a copy of your current .htaccess file to let's say .htaccess2.
Then in Wordpress go to 'Settings' --> 'Permalinks' and click 'save'. This will create a new .htaccess file.

After that try again.

Cheers.
Hi,

I think I missread, you already recreated the .htaccess.

Cheers
Matthew BHack

Author

Commented:
Hi all sorry the answer was the dev that did the transfer neglected to tell me that a plugin used php-xml extension. i never saw any mention in the errors about this.
Hi,

thanks for the update and glad it's solved!

Happy to help here.

Cheers
Hack
Commented:
Hi all sorry the answer was the dev that did the transfer neglected to tell me that a plugin used php-xml extension. i never saw any mention in the errors about this.
David FavorFractional CTO
Distinguished Expert 2018

Commented:
In the future, just glance at your WordPress debug log or Apache logs + you'll be able to determine root cause of any 500 error quickly.
Matthew BHack

Author

Commented:
Hi DAvid,

whats weird is i did do that.

And it Showed an error with the plugin but nothing referencing a missing php extension :(
David FavorFractional CTO
Distinguished Expert 2018

Commented:
The clue will be in the exact message generated... well... usually this is true...

Likely the plugin called some function which died, because the function wasn't defined.

Then you'll just lookup the function, which many times will relate to a missing extension.

Tip: This is common going from PHP-5.x -> PHP-7.x because many core functions were moved out of core into extensions.

Tip: Extensions are very small. When I setup a new LXD container install, I generally install most PHP extensions.

Tip: Avoid installing php-xdebug, if you're using PHP-7.3 along with MySQL/MariaDB, as a bug exists in XDebug which will cause all database transactions to die. Super annoying + takes forever to figure out.

Wait till XDebug-2.7 releases (full/real PHP-7.3 support) to install the php-xdebug extension.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial