When you're building your site offline, you'll find yourself using a different URL or domain name, versus what you end up using on your production website (where your customers access the site). Upon first moving the site, you might find that the image paths are incorrect, pointing to the original domain name. This article will help you resolve that issue.
Please note, that this affects everything that requires use of the domain name, and not only images.
The following pre-requisites will be necessary to accomplish the goals of this article:
- Superuser-level access to your site
- Familiarity with administrating your site
There really isn't much required for you to get started. Just make sure you have the requirements ready, and be logged in with a superuser account.
Changing the Primary URL
First, you'll need to navigate to your website, using the OLD domain name that you were previously using.
Next, go to the Site Settings page.
Now, find the Site Aliases settings as shown below.
If you haven't already done so, expand the Site Aliases section. Now, find the domain name that your site should be using as it's primary URL in production. If your company's name is "Example," then that domain name is likely "example.com." Click the pencil to edit that domain.
Check the checkbox to make this the primary URL moving forward. Then click the save icon.
Finally, click the Update button at the bottom of the page to save and apply the changes you've just made.
If you don't see your changes reflected immediately, you may need to clear the cache for your site.