Can't upload images to Wordpress media after migration

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

A client of mine moved his wordpress site from his servers to ours.  But there were several errors that came with the migration:

  • No files could be uploaded
  • No thumbnails could be seen on the media menu
  • Neither folders
  • And sometimes the site broke blank

These are the steps we took to fix that:

  1. Checked the primary keys on the tables:  _post and _postmeta .
  2. The migration didn't copy the primary keys and I had to create a whole new table _post2019 with the primary keys (not null, autoincrement)
  3. copy everything from _post to _post2019 and rename _post to _postold
  4. and then rename _post2019 to _post

This solved the database issues.  Permissions weren't a problem this time but I also checked everything was writeable as 755 for folders and 644 for files

Now back to Wordpress,

  1. Checked in options if it had a faulty upload_path. I left it blank so it could take the default value.
  2. I went to the tools section and the fix media library.  It gave me so many errors the first time with 550 files that I had to go to the options button on this tool
  3. At the options section of th fix media library tool, I set this up as:
    Unreferenced Thumbnails: don't analyze
    Broken attahments: delete
    Duplicate attachments: delete (not 'delete even if attached to different')
    Post GUID: update if there is a mismatch
    Unreferenced images: don't analyze
    Logging to: wp-content/uploads/media-library.log
    Verbose logging: checked

I opened the log file with SSH and checked for errors.  Even if the first runs gave me errors, I finally made it to fix all thumbnails and image references and all thumbnails showed up and files could be uploaded.

Wordpress, Migration

  • Hits: 396

Need Help?

Ticket system

Email: This email address is being protected from spambots. You need JavaScript enabled to view it.