• Resolved brettn

    (@brettn)


    Hi all,

    I’m hoping for a little help on a strange WordPress error.
    I’ve checked through the forums but didn’t see the exact issue here.

    Apologies in advance – I’m not very technical and don’t deal much with the WP back end / file setup (I handle the front end), so I may explain this badly, but I’ll do my best.

    I work on a commercial WP website. About 7 months ago, the software team changed servers, moving from international to local.

    Everything seemed to be going fine – all information and links were ported successfully, the site didn’t break, etc. On the front-end, everything still appears fine and functional. However, there appear to be some errors with content uploading since the move.

    When I upload something to the Media Library, initially, it appears fine. In the Media Library, the preview grid works as per normal. When I click on a file (a JPG for example) it opens a preview window properly, and when I click on the ‘view attachment page’ link in the preview window, that image loads properly as well.

    However, when I then click on that image, I get an HTTP Error 500.

    I notice this changes my URL to that of the direct upload:
    https://www.website/wp-content/uploads/date/filename

    Further investigation has shown a clear line: nothing that was uploaded before we switched servers has this problem. Everything that has been uploaded since, gives the same 500 error.

    It only appears to be a problem with the direct URLs, not with other usage of the file.
    For example, if I upload an image into the Media Library, I can drop it into a page, post or portfolio gallery, and it seems to display fine.
    However, if I try to link directly to where they are uploaded (by copying the URL from the Media Library into a button, for example) I get the server 500 error.

    Our software team are a bit stymied by this, so I’m hoping to help out.

    Has anyone encountered this before, or have any ideas?
    I’m not sure if its a database problem, or a WP problem, or a server problem…
    Anything that I can take back to the software team would be very appreciated!

    Cheers,
    Brett

    • This topic was modified 7 years, 6 months ago by brettn.
    • This topic was modified 7 years, 6 months ago by brettn.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your Dashboard, try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Seventeen theme to rule-out a theme-specific issue.

    If that does not resolve the issue, it’s possible that a .htaccess rule could be the source of the problem. To check for this, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and rename the .htaccess file. If you can’t find a .htaccess file, make sure that you have set your SFTP or FTP client to view invisible files.

    If you weren’t able to resolve the issue by either resetting your plugins and theme or renaming your .htaccess file, we may be able to help, but we’ll need a more detailed error message. Internal server errors are usually described in more detail in the server error log. If you have access to your server error log, generate the error again, note the date and time, then immediately check your server error log for any errors that occurred during that specific time period. If you don’t have access to your server error log, ask your hosting provider to look for you.

    Thread Starter brettn

    (@brettn)

    Thanks James,

    I’ll run through these one by one and see where I get.

    Cheers,
    Brett

    Thread Starter brettn

    (@brettn)

    Hi James / all,

    Happy to say the problem is now fixed.

    I tried the plugins and the theme switch with no effect.

    I then sent the tip about the .htaccess file through to our developers, who investigated that along with other file permissions.

    Not sure exactly what they did – they’re a close-mouthed bunch – but somewhere in that step the problem was fixed. All files can now be read properly.

    James, thanks for your help!
    I’ll leave this post up in case it’s of use to anyone else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Media Library http 500 Errors after server switch’ is closed to new replies.