This guide shows you how to manually move your WordPress site to another location on the same domain, for example, to a subdomain or from a subdomain to the main domain. With most hosting plans, you can use our 1-click migration tool instead of manually moving the WordPress site.
Before you start moving your WordPress installation, verify that your current site is working.
- Step 1 - Open the options table in your database
- Step 2 - Edit the siteurl and home options
- Step 3 - Moving your WordPress site
- Step 4 - Update permalinks
- Step 5 - Make a new connection to the control panel
- Step 6 - Done!
Note: Remember to make a backup of all files and tables in your database before you continue.
Step 1 - Open the options table in your database
- Log in to your one.com control panel and select PHP & database settings in the tile Advanced settings.
- Select your WordPress database in PhpMyAdmin and open the database.
- To access the table content list, click on the plus symbol next to the name of the database in the menu on the left.
- Select the table that ends on _options.
Note: If you have more than one WordPress installation on your web space, you need to check in your File Manager which table prefix you have to look for.
Step 2 - Edit the siteurl and home options
Next, your site's location will need to be changed in two places in the database.
- In this table that ends on _options, locate siteurl and home under the column option_name. Usually, these records are at the top of the table on lines 1 and 2.
- Start with siteurl and click Edit in the far left of this line, next to the pencil icon. This will open a window where you can see the field option_value. Replace the URL there with the new URL of your WordPress site. This will be the URL that users have to enter in their browser to visit your WordPress site.
- In this window, click Go on the bottom right to save changes.
Repeat the same steps for home.
Step 3 - Moving your WordPress site
The next steps depend on where you want to move your WordPress installation. Follow the steps for the option that applies to you.
- Option A - Moving your WordPress site from one subdomain to another subdomain
- Option B - Moving your WordPress site from a subdomain to the main domain
Option A - Moving your WordPress site from one subdomain to another subdomain
Edit folder in File Manager
Note: Follow this step if you are moving your WordPress site from one subdomain to another subdomain.
If you are moving your WordPress site from a subdomain to the main domain or vice versa, see option B.
- Open your File Manager in the Files & Security tile.
- Rename the folder of your WordPress site. It should get the name of the new subdomain on which your WordPress site will be published.
- Continue with Step 4 - Update permalinks.
Option B - Moving your WordPress site from a subdomain to the main domain
Move files in File Manager
Note: Follow this step if you are moving your WordPress site from a subdomain to the main domain or vice versa.
If you are moving your WordPress site from one subdomain to another subdomain, see option A.
- Open your File Manager in the Files & Security tile.
- Open the folder (subdomain) where your WordPress installation is currently published, select all files and subfolders, and move them into the main directory.
Note: If you are moving WordPress from the main domain to a subdomain, you have to create a folder for the subdomain, select all WordPress files in the main directory and move them into the folder for the subdomain.
Step 4 - Update permalinks
In order to prevent 404 errors on your WordPress site, we have to update the .htaccess file. To achieve this you have to update your permalinks.
- Log in to your WP Admin.
- Click Settings > Permalinks in the menu on the left.
- Scroll down to the button Save Changes and click on it to ensure that all subpages of your WordPress site will work without any issues.
Note: When you transfer an installation from a subdomain to the main domain, it is possible that the images on your website will disappear. This is because the URLs of the images in the content refer to the subdomain installation. In such cases, we suggest clearing all caches. If this doesn't solve the issue, please contact our support team for assistance.
Step 5 - Make a new connection to the control panel
Note: It is likely that your "old" website is still linked to your one.com control panel. If you attempt to log in through it, you will receive an error message. To solve this problem, you must establish a new connection. Prior to creating a new connection, verify in WP Admin that the one.com plugin has been installed.
- Log into the one.com control panel and click See more on the WordPress tile. It will open the dashboard with the old connection between WordPress and the one.com control panel.
- To update this connection, you need to click on ← Back to overview to get to your installation overview.
- Choose New connection to start the process of connecting your current WordPress site to your one.com control panel.
- Specify if your existing WordPress page is on the main domain or a subdomain and click Connect or Next to continue.
- That's it! Your one.com Dashboard is now connected to your current WordPress site.
Step 6 - Done!
You have now successfully moved your WordPress site within the same domain.
Open your website in your browser and check if everything is working correctly. If you experience any difficulties, please reach out to our support.
Don't have a website yet? With WordPress, you can easily and quickly build the website of your dreams.
Related articles: