Thu. Sep 23rd, 2021
Migrate or Move WordPress Site To a New Host (3 Easy Steps)
migrate wordpress

Transferring a WordPress web site from one host to a different generally is a advanced activity (and should even pose a number of threats) for those who don’t know your method round it. Nonetheless, web site migration ought to be a straight ahead course of and even for those who face an issue or two it’s best to be capable of sort out it simply by yourself.

On this tutorial, you’re going to find out how precisely emigrate a web site to a different host with none problems!

  1. Migrating WordPress Manually
    1. Importing WordPress Information
    2. WordPress Database Migration
    3. Tackling The Tough Bit
    4. Finalizing The Course of
    5. Settling In
  2. Migrating WordPress Website Utilizing SSH
    1. What Is SSH/Command Line?
    2. Accessing the Command Line
    3. Navigating to WordPress listing
    4. Taking the WordPress information Backup
    5. Taking the Database backup
    6. Putting in WordPress on the New Server
    7. Transferring WordPress Website to New Server
    8. Importing Database to New Server
  3. Migrating By way of WordPress Command Line
    1. What Is WordPress Command-Line?
    2. Taking the WordPress information Backup
    3. Import WordPress Information to Cloudways
    4. Taking the Database backup
    5. Looking out and Changing URLs on New Server
  4. Take a look at and Run the WordPress Website
  5. Migrate WordPress Utilizing Cloudways Migrator Plugin
  6. Why Migrate WordPress to a New Server
  7. Our Advisable WordPress Migration Greatest Practices

The largest downside you’ll be able to face whereas migrating your web site is the lack of knowledge. In the event you lose vital knowledge whereas transferring your information, chances are high that you simply’ll mess up your web site!

Observe that there are some helpful plugins that may show you how to do the job simply. And if you’re choosing managed WordPress internet hosting, they are going to transfer the location for you. So ensure you verify these choices as nicely. As well as, it’s all the time higher to backup your web site with a WordPress backup plugin earlier than migrating.

Additionally, this information can show to be a tedious course of for some individuals, so in the long run, you’ll be able to see how shifting your web site to Cloudways might be carried out in simply 3 simple steps!

For now, although, let’s concentrate on the steps that will help you migrate your web site to a different host with none hiccups!

Migrate WordPress Manually

The largest downside you’ll be able to face whereas migrating your web site is the lack of knowledge. In the event you lose vital knowledge whereas transferring your information, chances are high that you simply’ll mess up your web site!

Observe that there are some superior migration plugins that may show you how to do the job simply and plenty of internet hosting corporations, like Cloudways itself, will transfer the location for you, so ensure you verify these choices as nicely.

Additionally, this information can show to be a tedious course of for some individuals, so in the long run, you’ll be able to see how shifting your web site to Cloudways might be carried out in simply 3 simple steps!

For now, although, let’s concentrate on the steps that will help you migrate your web site to a different host with none hiccups!

Scared your web site would possibly break throughout migration?

No worries. Have a Cloudways Professional handle it.

I) Add The Information

Step one is to add the information. You’ve two choices for importing the information to the brand new host.

FTP Primarily based Methodology

Login to your present internet hosting account, navigate to the File Supervisor, and into the folder with the WordPress information. Compress (zip) all of your WordPress information, after which add the zip file to the brand new internet hosting supplier both by the File Switch Protocol (FTP) purchaser or the File Supervisor supplied by the brand new internet hosting account. As soon as uploaded, Extract the zip file within the public_html folder.

SSH Methodology [The Fastest Way]

The information may also be uploaded by SSH. Not all suppliers supply this service, and it’s best to verify for the platform-integrated SSH terminal. If it’s not accessible, use a purchaser equivalent to PuTTy to hook up with the brand new server. Use the next command:

 $ cd public_html/

As soon as linked to the server, entry the public_html folder ( the foundation folder for the WordPress information). Inside this folder, add the folder you zipped earlier within the FTP technique.

Go to your File Supervisor and be sure that your zipped folder is contained in the public_html folder. By default, it’s named public_html.zip, however you’ll be able to change it to one thing like mysite.zip. Now confirm the situation by accessing the URL. When the right URL is accessed, the need begin downloading routinely.

The generic URL would possibly seem like this: http://YOURSITE.com/mysite.zip

Now return to the PuTTy terminal, and enter the next command (just be sure you are nonetheless within the public_html folder):

wget http://YOURSITE.com/mysite.zip

As soon as downloaded, you will note a brand new zip folder in your public_html folder of your new host. To unzip the folder, run the next command.

Unzip mysite.zip

In the event you’ve carried out it accurately, all of the information out of your outdated websites ought to be imported to your new internet hosting. Observe the following step emigrate the Database.

II) WordPress Database Migration

Create a brand new database and a consumer on the new internet hosting server utilizing the MySQL Database Wizard (notice down the credentials as you will have them in a while).

Return to the outdated WordPress web site, set up the UpdraftPlus plugin to Export the database.

Backup WordPress Database

Utilizing phpMyAdmin on the brand new internet hosting account, Import the database created above.

Import Database File

III) Sort out the Tough Half

Merely go to wp-config.php (you will discover it in root) and change the credentials with the one you earlier famous, i.e., DB_NAME, DB_USER, DB_PASSWORD. In some instances, it’s good to present DB_HOST whereas shifting a WordPress web site to a brand new host, however that largely is dependent upon your server. Apart from that, you’re able to go!

Update wp-config Database Credentials

IV) Finalize the Course of

Discover the desk xxxxx-option in your database, and change option_value of siteurl and house with the brand new URL of your web site.

See also  SaaS, PaaS, and IaaS: A safety guidelines for cloud fashions

Change siteurl and home

Now you can go to http://newurl.com/wp-admin, go to Settings and choose Permalinks and alter it as per your need.

V) Settle In

You need to use the Velvet Blues Replace URLs plugin to amend each outdated URL to new URLs. As soon as carried out, you’re good to go! Voila, you’ve migrated your web site to your new host and are able to benefit from your new atmosphere!

VelvetBlues WordPress Plugin

Observe: If you’re unable to go to the location, strive clearing your browser cache.

2) Migrating WordPress Website By SSH

I) What Is SSH/Command Line?

SSH is a command line interface, extensively used to regulate distant machines (on this case, the servers are each the present and future properties of your WordPress web site). Shell instructions are used to execute a variety of actions on distant servers. It isn’t interactive and solely accepts textual content instructions for the operation you want to carry out.

SSH supplies a safe and encrypted channel by which info is shared between the purchaser and the distant server. Due to the recognition and virtually common use, an SSH terminal is built-in into iOS and Linux OS. Home windows customers have to obtain an SSH-client ( equivalent to  PuTTY) to provoke SSH classes.

Sadly, nearly all of WordPress customers should not accustomed to the command line interface. Subsequently, I’ll use quite simple steps to stroll you thru the remainder of this information. I can even clarify the behind-the-scenes working of the instructions, supplying you with a greater thought of what you’re doing.

IdeaBox – Case Research

Learn how Cloudways Helped a WordPress Company Construct Higher Merchandise.

Thank You

Your E book is on its Approach to Your Inbox.

II) Entry the Command Line

For the aim of this tutorial, I’ll use the SSH-client PuTTY for accessing the command line. Nonetheless, you could use any SSH-client of your alternative. You’d require the next to entry your present server by the command line:

  1. Server IP deal with
  2. Username
  3. Password
  4. Public key

Launch PuTTY, and navigate to SSHAuth.

Launch PuTTY

Now, get the general public key of your server and navigate to Session contained in the PuTTY window to enter the IP deal with of the server.

Session inside the PuTTY

Click on the Open button and log in along with your credentials. (Essential: log in as a root admin and enter the right password).

root admin

c) Navigate to the WordPress Listing

The very first thing I have to do after logging into the server by SSH is to navigate to my WordPress web site listing that accommodates the information and folders that I need to transfer to the brand new host.

Within the terminal, sort the next command that ensures that I’m on the root of the server.

cd

The subsequent command is ls, quick for the record command that shows all of the information and folders within the root folder.

list command

You would possibly see a unique record of information and folders which is ok. From right here, it’s good to go to the  WordPress set up folder. In my case, I’ll go to the www folder (containing the WordPress set up information) contained in the var folder.

Sort cd var/www and hit Enter.

Upon checking the content material of this folder by working the ls command, I can see that it accommodates the folder for the WordPress web site.

cd var/www

Merely sort cd wordpress (or regardless of the identify of your folder is) to achieve entry to the WordPress web site folder.

VI) Backup WordPress Information

The WordPress folder accommodates numerous folders and information and backing all of them is vital earlier than I truly provoke the method of migrating the WordPress web site. For this, I’ll create a zipper folder of the WordPress web site folder. That is the simplest and the quickest method of transferring knowledge from my present cloud server to the Cloudways managed server.

Observe: So as to run the zip command, ensure you have zip put in. You may set up zip by working the next command: sudo apt set up zip unzip

Whereas within the www folder, run the next command:

zip -r wordpress.zip wordpress

-r  flag permits recursive studying of information. Don’t forget to exchange the identify of the folder [wordpress]  and the filename  [wordpress.zip] to match yours.

After the method completes, cd again to the www folder or the folder by which you ran the zip command, and sort the ls command to substantiate that the zip file has been efficiently created.

 zip command

Nice! I’ve efficiently backup my WordPress web site. Let’s transfer forward and take the backup of WordPress database.

V) Backup the WordPress Database

So as to create a backup of the MySQL database, return to your SSH terminal and sort the next command:

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

Within the above command, I’ve equipped the next parameters. Please modify them to match your values.

-h localhost will keep the identical

-u is the username of the MySQL database

WordPress is the identify of the database.

Provide the password after working this command. As soon as the command is executed, you’ll discover {that a} new file has been created (with the identify ‘site.bak.sql’). This accommodates the whole database of our WordPress web site.

site.bak.sql

At this level, I’ve efficiently created backups of WordPress information and database. Let’s see how I  will transfer WordPress web site to a brand new host.

VI) Launch WordPress on Cloudways

Earlier than I proceed with the remainder of the WordPress migration, let’s arrange the server and launch a WordPress web site on the Cloudways Platform.

It takes a number of clicks to deploy a brand new server and launch a WordPress web site on Cloudways. If you wish to to know extra about it,  request a Cloudways demo and our specialists can be pleased to reply all of your questions.

Begin by signing up for a Cloudways account and select the specified taste of the WordPress web site from the drop-down menu. Title your utility, server, and the mission.

Launch WordPress on Cloudways

Select the cloud supplier, knowledge middle location after which click on the Launch Now button. Inside a couple of minutes, your server and the WordPress web site shall be deployed.

That’s it! The WordPress web site is up and working on the Cloudways managed server. Let’s migrate the present web site to the brand new server.

VII) Transfer WordPress Website to Cloudways

I’m now all set for initiating the migration course of. On this course of, I’ll migrate the zip file containing the backup of the WordPress information from my present folder to the brand new WordPress web site I’ve launched on Cloudways.

Earlier than I proceed, let’s hook up with the Cloudways server through FTP utilizing FileZilla. This fashion, I can simply monitor the information and their location. For that, I’ll launch FileZilla, navigate to Server Administration from Cloudways Platform and replica its Public IP, Username, and Password.

Move WordPress Site to Cloudways

Now, enter the credentials in FileZilla to entry the server. Navigate to functions[your wordpress site folder]public_html folder and delete all of the contents of this folder. This usually takes a couple of minutes. As soon as carried out, I’ll transfer the contents of my WordPress web site to this location.

Navigate to applications

Within the subsequent step, return to the SSH terminal and just be sure you are within the www listing. Subsequent, run the next command:

scp /var/www/wordpress.zip [email protected]:/house/grasp/functions/ewscfaavrd/public_html

Let’s see what’s occurring with this command:

See also  UpCloud Opinions by 6 Customers & Knowledgeable Opinion

scp [var/www/wordpress.zip] that is the situation of the file I want to ship to my new Cloudways server. Please change it to match yours.

[[email protected]] textual content earlier than the @ signal is the username of my new Cloudways server and after the @ signal is my public IP.

[:/home/master/applications/ewscfaavrd/public_html] this little bit of the command represents the situation the place I want to copy the zipped WordPress folder.

As soon as the command finishes, you will note a brand new file contained in the folder:

public_html

Lastly, I have to unzip the content material of this zipped file. To take action, return to your Cloudways platform and inside Server Administration, launch the built-in SSH terminal.

Server Management

Log in with the username and password (supplied as Grasp Credentials) and navigate to the WordPress listing the place I simply copied the zipped folder.

WordPress directory

Utilizing SSH for unzipping the folder is quick and straightforward. Go to the public_html folder of the appliance the place the zipped folder was copied from the outdated server, and run the next command to unzip the contents.

unzip wordpress.zip

As soon as the method is accomplished, run the ls command to confirm the content material of the unzipped folder.

Observe: Don’t take away/delete the zipped folder as it could be required in case if issues go south. When you will have verified that all the things is working because it ought to, delete the folder in a while.

 zipped folder

I’ve efficiently transferred the WordPress web site to the brand new Cloudways managed server.

Nonetheless, if take a better look, the situation just isn’t proper. So as to serve this web site, I ought to have the content material contained in the public_html, not in a folder contained in the public_html listing.

To maneuver all of the content material from WordPress folder to the mum or dad listing public_html, run the next command contained in the Cloudways SSH terminal whereas within the WordPress listing.

mv * ../

The mv command is used to maneuver information/folders, the * represents all information/folders, and ../ is to go one step again.

Run the ls command to substantiate that each one the information and folders have been efficiently transferred.

 files/folder

As you’ll be able to see, I’ve efficiently moved the WordPress web site to its new server.

VIII) Import WordPress Database to Cloudways

Let’s switch the .sql file from the outdated server to the public_html folder of our new WordPress web site on Cloudways. I’ll use the the scp command.

Observe: It will change/override the present database on the Cloudways server with the database on the outdated server.

scp /var/www/web site.bak.sql [email protected]:/house/grasp/functions/ewscfaavrd/public_html

Import WordPress Database to Cloudways

Now, return to Cloudways SSH terminal window and run the next command to import the database file.

mysql -u ewscfaavrd -p ewscfaavrd < web site.bak.sql

Cloudways SSH terminal

-u ewscfaavrd That is the database username of the WordPress web site on Cloudways.

-p ewscfaavrd That is the database identify of the WordPress web site on Cloudways.

database name of the WordPress site on Cloudways

At this level, I've moved the WordPress web site information and database to the Cloudways server. Let’s go forward and verify if the WordPress web site is correctly operational. For this, merely click on the appliance URL underneath the APPLICATION URL part.

Whereas looking the web site, I got here throughout the error web page which tells me that my WordPress web site is unable to hook up with the database.

APPLICATION URL section

This concern might be mounted by changing the outdated database credentials contained in the wp-config.php file with the brand new credentials supplied by Cloudways.

Launch FileZilla (for those who closed it earlier) and open the wp-config.php.

wp-config.php

Contained in the file, change the values of DB_NAME, DB_USER, and DB_PASSWORD, save and shut the file.

Now return and reload the web page, and the web site seems to be working superb.

DB_NAME, DB_USER, and DB_PASSWORD

As you'll be able to see, I've efficiently moved the WordPress web site and its database from my outdated server to its new internet hosting server.

Your complete course of would possibly really feel a bit prolonged, however it’s quicker and safe. Now, if in case you have a small web site, use the Cloudways migrator plugin for no-issue migrations.

3) Migrate WordPress through WP-CLI

As mentioned earlier, I can even cowl the migration course of utilizing WordPress Command Line or WP-CLI for brief.

I) What's WordPress Command Line?

Like SSH, WP-CLI is a command line interface particular to WordPress. This straightforward but highly effective device lets you function the CMS in just about the identical method because the WordPress frontend. Due to the pliability and ease, WP-CLI is the popular method many WordPress builders and customers work together with the CMS.

WP-CLI is used to switch WordPress websites, set up plugins, handle a multisite community, entry databases and improve the core information. Though all the above duties might be carried out through the online interface, it's nonetheless a most popular method of performing duties with out distractions.

Open your SSH terminal and be sure that WP-CLI is put in on the server. For that, merely sort the WP command under:

wp --info

Since I wouldn't have WP-CLI put in, the next error will seem:

WP-CLI installed

Let’s repair this by putting in the WP-CLI. Run the next command within the SSH terminal of your outdated server. cd again to the choose folder by going all the best way again to the foundation location. Preserve working the cd ../ command till you attain there.

Set up wp-cli by working the next command:

curl -O https://uncooked.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

This could set up the WP-CLI. Subsequent, verify this typing the wp –information command.

Now, change the file’s permission to make it executable.

chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/native/bin/wp

Return to the primary WordPress folder and run the next command that ought to exhibits the model of WordPress set up.

wp core model --allow-root

Debian root

Nice! Let’s go forward and take the backup of our WordPress web site utilizing WP-CLI.

II) Again up WordPress Information Utilizing WP-CLI

Taking a backup utilizing WP-CLI is much like the SSH based mostly course of. Navigate to the www folder and create a zipper file of the WordPress web site by working the next command.

zip -r wordpress.zip wordpress

Transfer the zipped folder contained in the WordPress web site folder by working the command under.

mv wordpress.zip

the place wordpress is the identify of the WordPress web site.

Now, go  to the wordpress folder by working the cd command and you'll discover the wordpress.zip folder.

The next screenshot summarizes the entire course of.

Back up WordPress Files Using WP-CLI

I've moved the zipped folder contained in the WordPress web site folder in order that it may be accessed by a URL. It ought to be downloadable from the URL like this:

http://[serverIP]/wordpress.zip OR http://[wordpress site location]/wordpress.zip relying upon your construction.

III) Import WordPress Information to Cloudways

Log into your Cloudways platform and launch the SSH terminal. Navigate to the brand new WordPress web site and contained in the public_html folder, sort the next command.

wget http://[serverIP]/wordpress.zip

It will fetch the whole zipped folder from the outdated server by a URL. As soon as the switch finishes, unzip the content material of the folder by working the next command:

unzip wordpress.zip

It will transfer all of the content material again to the mum or dad listing (public_html) by working the next command.

See also  Desktop Administration System

mv * ../

There you go! I've efficiently fetched the zipped folder and moved the WordPress web site to the brand new host.

IV) Take the Database Backup

The database might be backed up simply:

Run the next command to create the .sql file in your WordPress MySQL database.

mysql -u ewscfaavrd -p ewscfaavrd < web site.bak.sql

It will create the backup file that may simply be exported to Cloudways server utilizing built-in SSH shell.

V) Search and Change URLs (If You might be Transferring a Website to a New Area)

In case you're migrating to a different area, additionally, you will want to exchange the URLs pointed to your outdated area by a easy course of.

Within the Cloudways SSH terminal, run the next command:

wp search-replace "http://old-url.com" "https://new-url.com"

This command will first seek for all of the URLs after which change them with the brand new URL supplied within the later a part of the command.

Take a look at the WordPress Website

When you have adopted alongside and didn't encounter any roadblocks, it's best to be capable of see your migrated web site up and working in your new Cloudways server with none points.

It's all the time a good suggestion to cleanup a bit after finalizing the migration course of. For this, delete the zipped folder of the WordPress file in addition to your MySQL database. That is completely non-obligatory and if you're not frightened about disk area, go away them alone.

Migrate WordPress Websites to Cloudways in Three Steps!

As I discussed earlier, for those who’re migrating your web site from another host to Cloudways, the method has simply three easy steps!

  1. Set up Cloudways WordPress Migrator in your present internet hosting server.
  2. Enter the required credentials.
  3. Click on Migrate.

Here's a quick video information on how one can simply migrate WordPress from one other internet hosting server to Cloudways and expertise managed optimized cloud servers.

Migrate WordPress to Cloudways in 3 Steps!

As talked about earlier, for those who’re migrating your web site from one other to Cloudways, you are able to do so in 3 easy steps!

  1. Set up Cloudways WordPress Migrator in your present internet hosting.
  2. Enter the required credentials.
  3. Click on Migrate.

Here's a quick video information on how simply you'll be able to migrate WordPress to a different host (Cloudways) and expertise the velocity of optimized cloud servers.

Good, isn’t it? It’s simple, easy, and saves you time!

Let’s briefly try among the options Cloudways provides to its prospects.

Trade-Main Options

Cloudways Platform comes loaded with helpful options which allow the customers simply handle the companies like deploying a number of functions on a server, creating staging websites for testing out web site updates, integrating free SSL certificates, free cache plugin and CloudwaysCDN, add/handle crew members, SFTP entry and IP whitelisting, and so on.

Industry-Leading Features

24/7 Stay Assist

Assist is crucial for uninterrupted operations of any enterprise. Cloudways ensures that the shoppers all the time have entry to 24/7 dwell chat help. In addition to this, Cloudways prospects may also get prompt help from our data base in addition to from the energetic group that pitches in to assist fellow Cloudways customers.

Cloudways 24/7 Live Support

Intuitive Person Interface

The Cloudways platform may be very simple to make use of and even a non-techie can discover their method round with no trouble in any respect. Navigating by the server and utility settings may be very easy and sophisticated choices are defined through hints and tooltips.

Cloudways Intuitive User Interface

A number of Add-ons

In addition to a ton of built-in options, Cloudways additionally provides the choice to combine add-ons that finest go well with consumer necessities. These add-ons can be utilized for integrating e-mail suppliers, DNS companies, prolonged app-level help, migrations, and the sturdy Cloudways API for growing, integrating, and managing your server.

System Integration

Cloudways customers additionally benefit from the integrations for monitoring their server and utility well being through CloudwaysBot and New Relic APM. These instruments supply detailed web site efficiency evaluation and assist customers enhance utility efficiency.

Our Advisable WordPress Migration Greatest Practices

Now that you've realized all there's to find out about WordPress migrations, listed below are some really useful finest practices that it's best to comply with to keep away from any inconvenience throughout or after the migration course of.

Take a full backup of your server

Taking a backup is essential to your WordPress migration as a result of there are numerous issues that may go fallacious in the course of the migration course of. You may simply lose your knowledge with a minor glitch and all of your years of laborious work is gone to waste inside minutes. So it’s vital that you simply hold a number of copies of your database and your WordPress web site as a way to simply restore the most recent model if issues go fallacious.

Plan forward

Migrating your WordPress web site to a brand new host just isn't one thing to be taken evenly which is why it will be important that you simply plan forward and just be sure you should not working any campaigns in your web site on the times of the migration. It’s all the time really useful that you simply migrate your web site throughout low site visitors season and even put together a “Site Under Construction” web page in case of some downtime.
Take a look at your web site after migrating

It’s vital to all the time take a look at your web site’s efficiency after you have migrated it to a brand new host. With Cloudways, you will have the choice of migrating and testing your web site in the course of the trial interval so even earlier than you develop into a buyer, you'll be able to see how your web site is acting on Cloudways after which determine whether or not you need to transfer it completely or not.

Test for fast fixes

It’s widespread in your web site to not seem because it did in your earlier host after the migration course of. As soon as your WordPress migration course of is full, it's essential to just be sure you verify for damaged hyperlinks, breadcrumbs, sitemap, or another fast fixes that your developer can handle. Additionally, take a while and verify your site visitors after migration to see in case your web site is accessible to your customers or not.

Remaining Ideas

I hope by now you recognize the straightforward strategy of migrating your WordPress web site simply with out shedding worthwhile knowledge. You may select the choice that most accurately fits your requirement for migrating your WordPress web site to a brand new server.  Go forward and brag in regards to the expertise you acquired from this text. Command line is enjoyable and if you're considering extra helpful instructions, be at liberty to discover the web.

 

Buyer Overview at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Mustaasam Saleem

Mustaasam is the WordPress Neighborhood Supervisor at Cloudways - A Managed WordPress Internet hosting Platform, the place he actively works and loves sharing his data with the WordPress Neighborhood. When he's not working, you will discover him taking part in squash along with his pals, or defending in Soccer, and listening to music. You may e-mail him at [email protected]

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *