Velvet Blues URL Updater is a plugin that makes it easy to update URLs when your site’s domain name or directory structure changes. Here’s a step-by-step guide:
1. Open the Plugin Settings
- Log in to your WordPress dashboard.
- Navigate to Tools → Update URLs in the left-hand menu.
- You’ll see the plugin’s main settings page.
2. Configure the URL Update
- Old URL: Enter the current (old) URL of the website, e.g.,
http://oldsite.com
. - New URL: Enter the new URL, e.g.,
http://newsite.com
.
3. Choose What to Update
You’ll see several checkboxes. Select what needs to be updated:
- Update URLs in page content: Updates links within posts/pages.
- Update URLs for attachments: Updates media file links.
- Update custom fields and metadata: Updates links in custom fields (recommended).
- Update URLs in excerpts: Updates links in post summaries.
- Update links in widgets: Fixes links in widget areas.
- Update links in options: Updates URLs in site settings (only if necessary).
4. Run the Update
- Double-check the old and new URLs you’ve entered.
- Click the Update URLs NOW button.
- The plugin will process the update and show a summary of changes.
5. Verify the Changes
- Visit your website and check a few pages, posts, and images to ensure the URLs have been updated correctly.
- If something doesn’t look right, you can re-run the process or troubleshoot.
Explaining sites/[siteid]
in Old WordPress Asset URLs
In a WordPress Multisite setup, the sites/[siteid]
portion of an asset URL is used to identify which site in the network the file belongs to. Here’s a breakdown:
1. What is a Multisite?
WordPress Multisite allows you to create and manage multiple websites within a single WordPress installation. Each site shares the same core WordPress files but can have its own themes, plugins, and content.
2. Understanding sites/[siteid]
sites
: This indicates that the asset belongs to a site within a Multisite network.[siteid]
: This is the unique numeric identifier for a specific site in the network. For example:sites/2
refers to site ID 2 in the Multisite network.sites/5
refers to site ID 5.
The ID corresponds to the site’s position in the database and is assigned when the site is created.
3. Why Does It Appear in URLs?
When media files (like images, PDFs, or videos) are uploaded in a Multisite setup, they’re stored in a specific folder for each site to avoid conflicts between sites. For example:
- A file uploaded to the main site (site ID 1) might be stored at:
http://example.com/wp-content/uploads/2024/01/file.jpg
- A file uploaded to a secondary site (site ID 2) might be stored at:
http://example.com/wp-content/uploads/sites/2/2024/01/file.jpg
This structure keeps the media files organized and ensures that assets from one site don’t accidentally overwrite or interfere with assets from another site.
4. Why Does This Matter?
When URLs are updated, it’s important to keep the sites/[siteid]
structure intact. Removing or changing this part of the URL can break links to assets for specific sites in the network.
5. Key Takeaway
The sites/[siteid]
structure is essential for organizing media files in a WordPress Multisite. If you’re updating URLs (e.g., with Velvet Blues URL Updater), make sure not to remove or alter the sites/[siteid]
portion unless you are deliberately restructuring the Multisite network.