supportcentre scaled
Support Centre
Find the answers to your questions and get the support you need with the VentraIP help centre.

Changing your WordPress website’s URL

If you want to move your WordPress website to a new domain name, you will need to update your website so it knows it’s now operating under the new domain. This guide will walk you through the process step-by-step.

Before You Start

Make sure you have your new domain name ready and that its DNS is configured to point to your hosting service. If you haven’t set this up yet, follow our guide on ensuring your domain name is loading from our servers first.

Method 1: Update the wp-config.php File (Recommended)

This is the quickest and easiest method. Follow these steps:

  1. Log in to cPanel.
  2. Click on File Manager under Files.
  3. Navigate to the folder where your website is stored (usually public_html).
  4. Right-click on the wp-config.php file and click Edit.
  5. Add the following lines anywhere after the opening <?php tag at the beginning of the file:
define('WP_SITEURL', 'https://your-new-domain.com');
define('WP_HOME', 'https://your-new-domain.com');

Important: Replace your-new-domain.com with your actual new domain name. Use https:// if your site has an SSL certificate, or http:// if it doesn’t.

  1. Click Save Changes.

Method 2: Update Your Website’s Database

If you prefer to update the database directly, or if Method 1 didn’t work, follow these steps.

Step 1: Find Your Database Name

  1. Log in to cPanel.
  2. Click on File Manager under Files.
  3. Navigate to your website folder (usually public_html).
  4. Right-click on the wp-config.php file and click Edit.
  5. Look for the line that says DB_NAME – the database name will be in quotes next to it.

cPanel wp-config file showing database name

Make note of this database name – you’ll need it in the next step.

Step 2: Update the Database URLs

  1. Log in to cPanel.
  2. Click on phpMyAdmin under Databases.
  3. Click on your WordPress database from the left sidebar, then click on the _options table.
  4. In the Filter rows field at the top, type your old domain name to find the rows you need to update.

PHPMyAdmin Filter rows

  1. You should see two rows:
    • siteurl
    • home
  2. Click Edit next to each row.
  3. Change the old domain name to your new domain name in the option_value field.
  4. Click Go to save each change.

Additional Steps You May Need

Fix Image Links

After changing your domain, some images may not display correctly. If this happens, follow our guide on fixing image links in WordPress.

Update Remaining References (Search and Replace)

Your database may still contain references to the old domain in posts, pages, and settings. To fix this:

  1. First, create a backup of your database using phpMyAdmin’s export tool.
  2. Install a search and replace plugin to find and update all remaining references to your old domain.

Clear Your Cache

If you have any caching plugins installed (such as WP Super Cache or W3 Total Cache), clear all caches through the plugin’s settings in your WordPress admin area (wp-admin).

Fix Elementor Links (If Applicable)

If you built your site with Elementor, you’ll need to update links using Elementor’s built-in tool:

  1. Go to Elementor > Tools > Replace URL tab.
  2. Enter your old domain and new domain, then click Replace URL.
  3. Go to the General tab and click Regenerate Files under Regenerate CSS.
  4. Double-check that the URLs in Settings > General on your WordPress Dashboard match your new domain.

Need Help?

If you run into any issues during this process, feel free to reach out to our support team through a VIPcontrol eTicket.

misc content center scaled