Saturday, May 25, 2024

How To Export WordPress Site To Another Domain

Don't Miss

Migrate WordPress Sites To Cloudways In Three Steps

How to transfer a WordPress website to a different domain

As I mentioned earlier, if youre migrating your site from some other host to Cloudways, the process has just three simple steps!

Here is a short video guide on how you can easily migrate WordPress sites from another hosting server to Cloudways and experience managed optimized cloud servers.

Brilliant, isnt it? Its easy, simple, and saves you time!

Lets briefly check out some of the features Cloudways offers to its customers.

Backing Up WordPress Database And Files

Itâs best practice to always backup your website before making any changes, and a WordPress migration is no exception. There are a couple of WordPress plugins for doing this, but a manual approach is best if you want to be in complete control of the process.

Now, Iâll show you how to backup your WordPress files and database with a manual approach, and also via a plugin.

If You Forget To Change The Locations #if You Forget To Change The Locations

If you accidentally moved the files before you changed the URIs: you have two options.

  • Suppose the files were originally in /path/to/old/ and you moved them to /path/to/new before changing the URIs. The way to fix this would be to make /path/to/old/ a symlink to /path/to/new/, i.e. ln -s /path/to/new /path/to/oldand then follow the steps above as normal. Afterwards, delete the symlink if you want.
  • If you forget to change the WordPress Address and Blog Address, you will be unable to change it using the wordpress interface. However, you can fix it if you have access to the database. Go to the database of your site and find the wp_options table. This table stores all the options that you can set in the interface. The WordPress Address and Blog Address are stored as siteurl and home . All you have to do is change the option_value field to the correct URL for the records with option_name=siteurl or option_name=home.
  • Note: Sometimes, the WordPress Address and Blog Address are stored in WordPress Transients. Search and replace scripts can have trouble modifying those to the new address and some plugins might therefore refer to the old address because of them. Transients are temporary values stored in the wp_options database table that can be recreated on-demand when removed. Its therefore safe to delete them from the migrated database copy and let them be recreated. This database query clears all transients:

    DELETE FROM `wp_options` WHERE option_name LIKE '%\_transient\_%' 

    You May Like: How Much Does It Cost To Buy A Domain

    Vi Backup WordPress Files

    The WordPress folder contains a lot of folders and files and backing them all is important before I actually initiate the process of migrating the WordPress site. For this, I will create a zip folder of the WordPress site folder. This is the easiest and the fastest way of transferring data from my existing cloud server to the Cloudways managed server.

    Note: In order to run the zip command, make sure you have zip installed. You can install zip by running the following command: sudo apt install zip unzip

    While in the www folder, run the following command:

    zip -r wordpress

    -r flag enables recursive reading of files. Do not forget to replace the name of the folder and the filename to match yours.

    After the process completes, cd back to the www folder or the folder in which you ran the zip command, and type the ls command to confirm that the zip file has been successfully created.

    Great! I have successfully backup my WordPress site. Lets move ahead and take the backup of WordPress database.

    How To Export A WordPress Site Beginner’s Guide

    How to transfer wordpress domain to another domain

    Domain transfer is simplest if you don’t have a website on the domain yetthen it’s just moving the domain registration from one host to another. I waited to migrate my site content until after my domain transfer was complete, and that wasn’t a big deal for me because my site is a portfolio for prospective clients that gets a small. Your clone facility for WordPress is excellent but it would be really great to be able to provide a facility to copy the WordPress site to another domain name and at the same time fixing up all the database issues that such a move gives

    Also Check: How Much Does It Cost To Buy A Web Domain

    How To Migrate A WordPress Multisite: A Step

    WordPress Multisite has been a highly beneficial addition. While you cant use it for every new web development project, its highly valuable when all the right variables are in place.

    In the Ultimate Guide to WordPress Multisite, we talked about how to enable Multisite and create a network of sites from within a single installation of WordPress. If youve followed our recommendations, then you should have a fully functioning WordPress Multisite up and running.

    But what happens when someone changes their mind and wants to move their site out of the multisite network? Or what if you have a new idea for a site and you want to add it to the networks umbrella of sites? Or perhaps you rebranded the Multisite network altogether and now need to get all these sites over to the new domain name. What do you do when you want to migrate a WordPress Multisite?

    In the following step-by-step guide, Ill show you how to complete each of the three Multisite migration types.

    How To Move A WordPress Site To A New Domain Without Losing Traffic

    Moving your website to a new domain could lead you to lose traffic.

    However, that shouldnt necessarily be the case.

    To avoid this, you must notify Google about your new domain as quickly as possible.

    Notifying Google about your address change will quickly help the search engine find your new website. As a result, you dont miss out on organic traffic from search engines.

    How do you alert Google of your new domain?

    First, ensure your new and old domains are added to Google Search Console as two different properties. Heres a detailed guide on doing that from our friends at WPBeginner.

    Once youve added your new domain, select the old domain as the active property in your GSC dashboard.

    Next, click on the Settings icon on the left column and select the Change of Address option.

    Here, youll be asked to select your new domain under the Update Google section. Once youve put in your new domain, click on the Validate & Update button.

    Google will then validate that your old domain redirects to the new domain. Youll then be taken through the steps of submitting your change of address request.

    Recommended Reading: Cost Of Purchasing A Domain Name

    Migrating A WordPress Site Manually

    If youre comfortable working with SFTP and MySQL, it can be a quicker and more reliable way to migrate your site manually instead of using a plugin.

    Here Ill be focusing on migrating one standalone WordPress installation to another. In the next section, Ill look at how this differs for WordPress Multisite networks.

    Import The Database Tables To Your New Site

    How to transfer a WordPress website from one domain to another without losing SEO

    The final step is to import the database tables.

    In the hosting interface for your new site, go to phpMyAdmin. In MyKinsta, you access this via the Info screen for your site.

    If you accidentally created a WordPress installation already, or you need to override an existing WordPress site, youll need to drop the existing database tables. Select all of the tables in the same way as you did when exporting them from your old site, and click the With selected: dropdown list. Select Drop.

    You will be prompted to confirm that you want to delete the tables, and then everything in your database will be deleted. If you have any doubt that you want to do this, make a backup of the database first by exporting the tables.

    Once youve dropped your database tables, or if you didnt have a database in the first place, youll need to import the tables from your old site to your new site.

    In phpMyAdmin, click the Import tab. In the File to import section, click the Choose file button and select the SQL file on your computer that you downloaded already.

    Go to the bottom of the page and click the Go button. PhpMyAdmin will upload the SQL file and use it to create database tables for your new site which will be identical to the ones in the old site.

    You May Like: How To Find Email Domain And Server

    Get That Domain Ready

    Before you even go to your website WordPress settings or your current domain hosts dashboard, you need to make sure you have that new domain name. There are plenty of domain registrars or web hosts out there, but before you even begin the steps below, you need to make sure that you have that new one ready to go and that the WordPress hosting cost works for you and your needs.

    V Backup The WordPress Database

    In order to create a backup of the MySQL database, go back to your SSH terminal and type the following command:

    mysqldump --add-drop-table -h localhost -u wpuser -p wordpress >  site.bak.sql

    In the above command, I have supplied the following parameters. Please adjust them to match your values.

    -h localhost will stay the same

    -u is the username of the MySQL database

    WordPress is the name of the database.

    Supply the password after running this command. Once the command is executed, you will notice that a new file has been created . This contains the complete database of our WordPress site.

    At this point, I have successfully created backups of WordPress files and database. Lets see how I will move WordPress site to a new host.

    You May Like: Transfer Shopify Domain To Another Host

    Unpack WordPress On Your New Domain Name

    Once youve created the database for your new website, its time to unpack your website on your new domain name. This is where the Duplicator package you built in the first step comes into play. Remember, it includes your WordPress installation, meaning you dont need to install WordPress on your new domain.

    To unpack your website, you must first connect to your new domain name using an FTP client. When thats done, make sure the root directory of your website is completely empty. Once youve ensured the root directory is empty, you can then upload the archive and installer files to the root directory.

    Note: the root directory is usually public_html.

    Ii Back Up WordPress Files Using Wp

    How To Export WordPress Site To Another Domain

    Taking a backup using WP-CLI is similar to the SSH based process. Navigate to the www folder and create a zip file of the WordPress site by running the following command.

    zip -r wordpress

    Move the zipped folder inside the WordPress site folder by running the command below.


    where wordpress is the name of the WordPress site.

    Now, go to the wordpress folder by running the cd command and you will find the folder.

    The following screenshot summarizes the whole process.

    I have moved the zipped folder inside the WordPress site folder so that it can be accessed through a URL. It should be downloadable from the URL like this:

    http:/// OR http:/// depending upon your structure.

    You May Like: Connect Godaddy To Shopify

    How To Transfer A WordPress Website To A New Domain

    Do you want to transfer a WordPress website to a new domain? The steps involved in transferring a website to a new domain address can seem a little overwhelming at first. But you need to make a proper backup of all your website files so that you dont lose any content. You need to ensure proper security for your websites content. Usually, your hosting provider can help you do this easily and safely. But if you want to know how to do it yourself, then read on below.

    Disallow Access To One Of Your Sites To Avoid Duplicate Content

    In most cases youll want to hide content of your target site from search engines.

    On you made the setting inside your WordPress site to discourage search engines from indexing the site. But I would not trust this setting 100%.

    In order to hide your website copy completely from web crawlers and search engines and thus minimize the risks of getting a duplicate content, I suggest using two simple and free ways:

  • Set password to the whole installation folder of your WordPress site using a cPanel tool.
  • Restrict access to your site by IP.
  • You can use any of the two methods. See below how you can do it.

    Setting password to the folder with your WordPress installation

    When your website is password-protected, web bots including search engines crawlers will not be able to access and index your website.

    There are some WordPress plugins that can let set the password super easily. However, Im not a fan of using yet another plugin, because each plugin makes your site slower, more vulnerable to hackers and more sensitive to incompatibility issues. So, Ill show you the plugin-free method to prompt anyone visiting your WordPress site to enter a password.

    Some hosts may contain the tool in cPanel called Password Protect Directories. It lets you set the password for any directory with literally two clicks. Just select the application root directory and set the password for it.

    But if your host does not have this feature for you, heres how you can do a similar thing manually.

    Don’t Miss: How To Find Out Who Owns Domains

    Wait For Dns Propagation

    Now its a matter of waiting for the new changes to take effect, which typically takes a few hours. However, note that DNS changes can take up to 24 hours to propagate.

    To speed up the process, you can flush your DNS cache. This is especially useful after transferring hosting accounts to clear any corrupted or outdated DNS cache records.

    You can see if your sites domain is already pointing to the correct nameservers by checking its DNS A record. Do this to see if your domain has the same IP address as the one provided by your new hosting provider:

  • Access the hPanel and find your hosts IP address on the left sidebar. Take note of this.
  • Then, head to Advanced -> DNS Zone Editor.
  • Under the Type column, navigate to A and check your domains A record value under Content. Make sure it has the same value as the IP address given by your web host.
  • Transfer Your Website Using A Plugin

    Export or Import WordPress Website from one domain to another domain without Taking backup

    There are numerous migration plugins we recommend, like All-In-One WP Migration and Duplicator. Although the features vary with each plugin, they all work to simplify the website migration process.

    Using a migration plugin is an excellent option for beginners and those with little to no technical knowledge. For example, All-In-One WP Migration enables you to upload databases, files, themes, and plugins to another server with just a few clicks. It even offers a drag-and-drop import function to further simplify the transfer process.

    Similarly, Duplicator has a function that enables site owners to copy and clone their website to another host or staging area with no website downtime.

    This plugin also offers a backup solution by bundling site files into a .zip format to optimize mobility and efficiency. Moreover, it comes with a file pre-configuration feature to simplify backups and transfers.

    You can also check out our list of the best WordPress database plugins to help make your WordPress website transfer process easier.

    Heres an example of how you can transfer hosting for an existing website using Duplicator:

  • Install the plugin on your old hosting accounts WordPress dashboard. There are two ways to do this:
  • Conduct a manual install by downloading the plugins .zip file and uploading it to your dashboard by clicking Plugins -> Add New -> Upload Plugin.
  • Click Activate on the plugin once its installed. Alternatively, Activate the plugin via Plugins -> Installed Plugins.
  • You May Like: Making Money Selling Domains

    More articles

    Popular Articles