Browse by Popular
Domain Name
- What is a domain name?Eligibility criteria for registering .AU domain namesPremium domain names explained
Web Hosting
View AllEmail Hosting
View AllGoogle Workspace
- Getting Started with Google WorkspaceGoogle Workspace support resourcesTransferring an existing Google Workspace service to VentraIP
Account
- How do I reset my VIPcontrol password?How do I create a VentraIP account?How can I see who accessed my VentraIP account?
Troubleshooting
- How do I clear my browser cache?Troubleshooting a ‘500 internal server' errorTroubleshooting with a ping test
Changing your WordPress website’s URL
If you want to move your WordPress website to a new domain name, you will need to make some changes to the website itself to ensure it understands that it’s now operating under a new domain name. There are a few ways this can be done:
Changing the domain name
Updating the wp-config.php file
The easiest way to do this is to simply add the following lines to your website’s wp-config.php file.
define('WP_SITEURL', 'http://my-new-domain-here.com');
define('WP_HOME', 'http://my-new-domain-here.com');
The steps to do this are:
- Log in to cPanel.
- Click on File Manager under Files.
- Navigate to the folder that your website is stored in (this is usually the public_html folder).
- Right-click on the wp-config.php file.
- Click Edit.
- Add the lines of code provided anywhere after <?php at the beginning of the file.
- Click Save Changes.
Updating your website’s database
Before proceeding, you may need to find out what database your website is using. To find this info, follow these steps:
- Log in to cPanel.
- Click on File Manager under Files.
- Navigate to the folder that your website is stored in (this is usually the public_html folder).
- Right-click on the wp-config.php file.
- Click Edit.
- You will see the database name next to DB_NAME in the file.
You can manually update your website’s domain name in the MySQL Database for it. The steps to do this are as follows:
- Log in to cPanel.
- Click on PHPMyAdmin under Databases.
- Click on the database for your WordPress website, then click on the _options table.
- In the _options table, you will find a few entries that include the existing domain name, they will be:
- siteurl
- home
- You can find the rows you need to update by inputting the existing domain name into the Filter Rows field (see below).
- Click Edit next to each row, to change the URL.
Other things to consider
Fixing image links
Sometimes you may need to update your image links after completing these steps. We have a separate guide on how to do that.
Search and replace
There may still be some references to the old domain name in your website’s database. If you find this is the case, you can use a search and replace plugin to update all the references in the database. Before doing this, take a backup of your website’s database using PHPMyAdmin’s export tool.
Clearing your caches
If you have any caching plugins installed, you may want to clear all cache. The plugin will allow you to do this in the plugin’s management interface, via your WordPress website’s admin portal (wp-admin).
Sites made with Elementor
The way that Elementor pages and content is linked via the database is different. You will likely need to fix these links after changing your domain name – luckily, Elementor has a tool to manage this for you!
- Go to Elementor > Tools > Replace URL Tab.
- Enter your old-url and your new-url and click Replace URL.
- Under the General Tab > Regenerate CSS, click Regenerate Files.
- In Settings > General on your WordPress Dashboard, make sure that the URLs are similar.