500 server error due to GUID in wp_post

Posted in: Newspaper
Post count: 3

I had started to get crazy 500 server errors that would spike my server’s CPU / resources. I was suspended from my web host. Turns out, this was the error in the log that kept popping up. Even after I created a file in that path noted below, it kept giving me the error.

[11-May-2020 21:02:44 UTC] PHP Warning: getimagesize(https://{MYDOMAIN}/d2d/wp-content/uploads/2020/04/YY2wpKOb_400x400-300x300.jpg): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
in /home1/{MYACCOUNT}/public_html/wp-content/plugins/td-cloud-library/shortcodes/header/tdb_header_logo.php on line 792

What I realized is that y’all are using the GUID column in wp_posts as the reference url for a given attachment / asset. GUID’s don’t change, so if someone migrates their site from a subfolder or to a different subdomain, it causes an issue.

Any way, I used a mass update SQL statement to remove the “d2d/” portion of the url noted above for all GUID’s and the site started working again. Just wanted to pass on this behavior in the code so that y’all can update the template. I think someone else may encounter the same issue if they migrate their site and the domain path changes slightly.

Viewing 1 post (of 1 total)
The forum ‘Newspaper’ is closed to new topics and replies.