How to change your WordPress URL
You may need to change the URL of your WordPress site, either because WordPress is installed in a subfolder and you want to move it to the root of your hosting (going from https://domaine.tld/wordpress to https://domaine.tld), or because you are changing domain name. WordPress stores this address "hard-coded", notably in its database, which can make it tricky to change. (By comparison, Joomla does not have this problem, as the address is only referenced in its configuration file, not in the database.)
Here we explain how to change the URL of your WordPress site in both of these cases.
1) Moving WordPress from one folder to another:
In this example, we have an (old) website in the httpdocs folder and our new WordPress site in the httpdocs/wordpress folder.
Development of your new site is complete, and you want to replace your old site with the new WordPress one.
- Move the current contents of httpdocs to another folder if you want to keep them. Preferably move them to a folder at the same level as httpdocs (alongside it), so that the old site is not accessible online.
- Go to your WordPress administration (usually at https://domaine.tld/wp-admin), then open the Settings > General menu.
In the WordPress Address (URL) field, replace https://domaine.tld/wordpress with https://domaine.tld
In the Site Address (URL) field, replace https://domaine.tld/wordpress with https://domaine.tld
Click "Save Changes". - Copy the contents of the wordpress folder into httpdocs. Make sure the .htaccess file is copied too (this file may be hidden). Otherwise, you can recreate it:
open the Settings > Permalinks menu and click the "Save Changes" button to recreate the .htaccess file. - You can now delete the wordpress folder, as it is no longer needed.
- Visit your site: some images may be missing because they are referenced with the old URL in your WordPress database. This information then needs to be updated in the database. You can use phpMyAdmin for this, but a simpler method is to use a dedicated WordPress plugin.
The Go Live Update Urls plugin can handle these changes: in the WordPress Plugins menu, click Add New, search for the Go Live Update Urls plugin, then install and activate it.
In the Tools menu, click the newly added Go Live entry. At the bottom of the page, fill in the Old URL and New URL fields, leave the checkboxes as they currently are, then click the Update Urls button.
Once the operation is complete, visit your site and check that it displays correctly. You can then remove the Go Live Update Urls plugin, which is no longer needed.

2) Changing the URL after a domain name change:
Both the old and the new domain must point to the same hosting for you to access your site.
a) If your old domain name is still active:
- Rename your current hosting (old domain name) with the new name, then add the old domain name as an alias (without ticking the "Use permanent redirection with HTTP code 301" box). (Check with technical support if this option is not available on your plan.) Your site should now be accessible under both domain names.
- Go to your WordPress administration (usually at https://old-domain.tld/wp-admin), then open the Settings > General menu.
In the WordPress Address (URL) field, replace https://old-domain.tld with https://new-domain.tld
In the Site Address (URL) field, replace https://old-domain.tld with https://new-domain.tld
Click "Save Changes". - Visit your site: it should display correctly, but some images may still be loaded via the old URL. This needs to be changed so that your site does not stop working on the day the old domain name is no longer active.
- In the WordPress Plugins menu, click Add New, search for the Go Live Update Urls plugin, then install and activate it.
In the Tools menu, click the newly added Go Live entry. At the bottom of the page, fill in the Old URL and New URL fields, leave the checkboxes as they currently are, then click the Update Urls button. - Once the operation is complete, visit your site and check that it displays correctly. You can then remove the Go Live Update Urls plugin, which is no longer needed.
b) If your old domain name is no longer active, you can follow the same steps as above, but first edit your computer's hosts file so that you can reach the hosting via that domain name. Please follow our guide: How to access a hosting plan whose domain name is not active or points elsewhere.
Remember that our technical team is available for any request 7 days a week via support ticket.
