To move WordPress media without breaking images, migrate both the upload files and the database that references them. Keep the uploads folder structure intact. If the domain or upload path changes, update the stored URLs on the destination. Before switching traffic, open several pages on the new host and check which image URLs the browser actually requests. A picture in the Media Library is a good sign, but it doesn’t prove that an older post, a mobile thumbnail, or a page-builder background still works.
1. Find out where your media lives
On the old site, go to Media → Library, open an image, and note its File URL. Repeat with an older upload and a recently added one. Then open an older post with an embedded image and check the image URL there, too. You’re looking for the domain and path that actually serve each file, not just the address of the WordPress dashboard.
Most single-site installs store local media in wp-content/uploads, often in year and month folders such as 2024/06. Confirm the folder in your host’s file manager or over SFTP. If the public URL uses a CDN, check whether the CDN pulls from your uploads folder or a plugin stores the originals in a separate bucket. In the latter case, copying the local folder may leave you with only part of the library. Check the offload plugin’s storage settings and plan to keep that storage connected or transfer its contents before retiring it.
2. Copy the full upload tree and migrate the database
- Take a fresh backup of the files and database. Keep it separate from the copy you’ll work on. Use a staging or destination install for the migration so you can test without changing the live site.
- Copy the entire uploads tree. With SFTP or your host’s file manager, preserve the subfolders, filenames, and capitalization. Put the files in the destination’s actual uploads location. If you’ve created an
uploads/uploadsnesting accident, the files may all be there and still be exactly one directory too far away. - Move the matching database. For a full-site move, migrate the source database with your host’s migration tool or your normal database import process. It holds attachment records, image metadata, and content that embeds media. Copying files over SFTP doesn’t create Media Library entries. If you’re merging media into an existing site rather than moving the whole site, use a migration workflow that imports attachments and remaps references; don’t overwrite the destination database.
- Check what arrived. Compare file counts where your tools make that practical, and spot-check older folders, recent uploads, and generated sizes. Open a sample original and a smaller variant directly on the destination. If the live site stays active during a long copy, plan a final sync of new or changed uploads and a fresh database migration during a pause in editing and uploads.
If your starting point is a .wpress backup, extracting it gives you files you can inspect or copy, not a working WordPress site. You still need a database restored into WordPress and a configured destination. Damaged, encrypted, or unsupported archives may not extract successfully.

3. Update image URLs only where the address changed
If the public domain and upload paths are staying the same, a host move alone doesn’t call for a database-wide URL replacement. If they changed, first compare one old image URL with the intended new URL for that same file. For example, if a site moved out of a /blog subdirectory, swapping only the hostname could leave every affected image pointing one folder too deep.
- Preview a targeted replacement on the destination. After backing up its database, use a WordPress-aware search-and-replace tool that handles serialized data, with a dry run or preview. Match the old site base or old upload prefix to the correct new one, depending on what changed. Review the affected tables before applying the change. Don’t use a plain SQL text replacement across the database; it can corrupt serialized settings.
- Leave unrelated URLs alone. Keep attachment GUIDs out of the replacement; they are identifiers, not a list of image links to repair. Don’t rewrite links to external image services or a CDN that you intend to keep. If your sample pages reveal older HTTP or alternate-hostname URLs, review those variants separately.
- Check generated assets and caches. If a page builder still serves old image URLs from generated CSS, use its documented rebuild process after correcting the underlying references. Purge the destination’s page and CDN caches as appropriate, then retest logged out.
4. Troubleshoot the request, not the empty rectangle
Open a page with a missing image. In your browser’s developer tools, open Network, reload, and select the failed image request. Scroll it into view if it loads lazily. Check the requested URL, status, and response type. For responsive images, WordPress may offer several sizes through srcset; the browser may request a different file on a phone than on your desktop. Test both widths. A thumbnail can fail while its full-size original looks perfectly healthy.
- Old domain, staging hostname, or wrong folder: Check where the URL comes from. It may be saved in a post, a builder setting, or generated CSS, or supplied by a CDN or offload plugin. Fix the source before clearing caches again.
- 404 Not Found: Compare the exact requested path and capitalization with the destination files. If the original exists but a file ending in something like
-300x200.jpgis missing, restore the variant from the backup first. If it isn’t there, try regenerating image sizes on staging. Regeneration needs the original and may not recreate a retired theme’s dimensions or an old custom crop. - 403 Forbidden: Check file ownership and permissions with your host, or verify bucket access and any CDN hotlink rules for the new domain. A permissions problem is not a reason to make the entire uploads folder writable.
- 200 OK, but still no picture: Check the response type and preview. A login screen or HTML fallback can return 200 at an image URL. If the browser reports mixed content instead, correct the stored HTTP reference and verify that the image host can serve the file over HTTPS.
5. Verify before switching traffic
Use your host’s supported preview method if the domain hasn’t moved yet. Check an older post, a gallery, a featured image, and a page-builder background if you use one. Verify that the homepage and a few posts load images when logged out, at desktop and mobile widths. On staging, upload a small test image, insert it into a draft, and preview it to confirm that new uploads land in the right place as well.
After cutover, repeat the checks on the public domain. Look at the requested hostnames as well as the pictures: the old server can quietly keep a bad migration looking good. Keep the source and backup available until the destination serves your sample images from the intended locations without depending on anything you plan to shut down.