Move a WordPress site in between domains in a Loopia account

This guide allows you to move a WordPress page between two domain names in a Loopia account. For example, it may be about moving from blog.mydomain.com to mydomain.com.

1. Configure the domain name

The domain name you want to move the WordPress page to must have the UNIX configuration for WordPress to work. This you do by doing following:

  1. Log in to your Loopia Customer zone.
  2. Click on the domain name you want to move the site to.
  3. Choose the configuration “homepage at Loopia” -> “UNIX” and click on “save“.

Configure a media-sub domain

If your current page is installed with our One Click Installer, it most likely has a separate sub domain for media files (Images, videos, etc.), such as media.yourdomain.com. If you move a WordPess between two different domain names (such as yourgames.com to yournewdomain.com), you must also configure a new media sub domain (for example, media.yournewdomain.com). If WordPress has moved from a sub domain to a main domain or vice versa, skip this step.

  1. At the right side of the customer zone, click “Add/Create…” -> “Sub domains“.
  2. Select your new domain name in the list and enter “media” in the “New Sub domains” field.
  3. Click “add“.
  4. Click on the domain name and change the configuration to “Autobahn” and click “Save“.

2. Move the files

  1. Log in to your FTP account.
  2. Rename the folder where the page is currently located with folders where you want the page to be located (change to example yourgames.com to yournewdomain.com and vice versa).
  3. If you have configured a new sub domain (see above), you also switch the name of these folders (such as media.yourolddomain.com and media.yournewdomain.com).

If you have files on a domain name that is not included in WordPress and that you do not want to move, then the method to only rename the folders not so good to do. Instead, manually copy the WordPress content between the folders.

3. Configure WP Super Cache

If you installed WordPress via our One Click Installer, you may need to edit another file for the WP Super Cache extension to work properly after moving/copying your WordPress page.

Open the wp-content/wp-cache-config.php file and find the $cache_path line. If you can not find the file, you do not need to proceed with the step below:

This search path must be updated with your absolute cache search path. If you do not know what your account’s absolute cache search path is, you can always contact us at support@loopia.se to get this.

In some cases, you must also update the wp-content/advanced-cache.php file if an absolute search path is specified there:

Note that this absolute search path should be different from the cache search path above. If you do not know what your account’s absolute search path is, contact us at support@loopia.se to get it.

4. Change in the database

What’s left now is to update the old domain name with the new one in the database. Do this with the searchreplacedb2.php file. It can be downloaded here.

  1. Log in to your FTP account and add the file to yourdomain.com/public_html folder.
  2. Now you will visit the script itself, in this example, it will be http://mindoman.se/searchreplacedb2.php.
  3. Click through the guide until you get to the step “What to replace?“.
  4. Enter your old domain under “Search for” and your new one under “Replace with“.

flytta_wp_swe_6.png

5. The changes in the database

What’s missing now is to update the old domain name with the new one in the database. Whether it should be the same domain name for the page (for example, if you move the page from another provider), skip this step.

This change can be done with the help of a script that you can download here. You are downloading locally a .ZIP file that you extract with optional compressor program that supports ZIP files or right-click the file and select “Extend All” and follow the instructions. The folder (Search-Replace-DB master) that you get when the process is complete will load it after uploading it to your FTP.

  1. Log in to your FTP account and place the folder under mydomain.com/public_html. Now you will visit the script itself. In this example, this URL will be http://mindoman.se/Search-Replace-DB-master.
  2. Enter your old domain under “replace” and your new one under “with“.

3. Then click on “live run” to make the changes.

live run

4. At the end, click “delete me” to remove the script from your material now as there is a security risk to keep it on your server.

delete

Was this article helpful?

Related Articles