How to Migrate WordPress to Google Cloud – Beginner’s Guide
How to Migrate WordPress to Google Cloud 
In this post, I’ll demonstrate how to host a WordPress website on a Google VM instance and walk you through the steps of setting up WordPress on a Google cloud server.The first approach is a little technical and calls for a basic command-line proficiency in Linux as well as knowledge of various stacks. Complex procedures like patching, OS updates, firewall settings, and backups that must be manually carried out by the system administrator or server owner are also a part of managing a Google server.
How to Migrate a WordPress site to Google Cloud
This article explains how to move a WordPress website to Google Cloud with little to no downtime for students and new users. It might be difficult for novice users to migrate a WordPress-powered website that is already up and running on one server or locally.
Moving a website involves a procedure. For a successful migration with little to no downtime, you must adhere to it. These must be adhered to, from setting up the new server environment to changing your DNS records to include the new host. We’ll walk you through each step of how to migrate a WordPress site successfully to a Google Cloud server in the sections below. You might wish to learn some fundamentals, such as how to set up a Google Cloud server in the cloud and register a domain name, before we begin. Here are a few posts you might also find interesting to read:
When moving a WordPress site to the Google cloud, the aforementioned post should be helpful.
Why Is WordPress Migration Important?
Because there are so many factors to consider, moving a WordPress site may be a frustrating experience for some website owners. Others think it’s too hazardous and worry that it may harm their entire WordPress website. However, relocation may be a smooth process with many advantages if done properly. The following are some of the most frequent causes for website owners to move their WordPress website to a different server:
- Better value. Given the variety of hosting options available, you could discover another web host that provides greater value for the money. For instance, the Shared Hosting options from Hostinger start at $1.99.
- Better customer support.Having quick and competent customer service at your disposal may make managing a WordPress website easier.
- More hosting resources and features.Getting the tools and resources for hosting is essential if you want to expand your WordPress website.
- Better server security. As a website administrator, securing your WordPress website ought to be your first responsibility. Additionally, it is essential for preserving the reputation of your website and the privacy of its users.
Why Host WordPress on Google Cloud
Mammoth corporations like HSBC, Twitter, PayPal, and Bloomberg employ Google Cloud, one of the most advanced, dependable, and quick cloud infrastructures, for their hosting needs. The following list of factors suggests that Google WordPress hosting could be the best option for your websites:
For large eCommerce businesses, trading platforms, and news websites, optimal server uptimes are a must since even a minor service outage may result in significant financial loss. The availability of Google Cloud Engine exceeds 99.9% of the time.
Since Google (nearly) controls the Internet, it is imperative that you perform well in order to rank highly in Google SERPs. Google Cloud hosting enables WordPress websites to be quicker because speed is one of the most significant ranking signals the search engine giant employs to rank pages in the SERP.
GCE makes use of the same infrastructure as YouTube and Gmail. When was the last time you had free time and used Gmail or YouTube to view videos? Yes, that’s correct—never. This implies that by using Google’s cloud infrastructure to host your website, you are using the best hardware and data centres available. The Google Cloud team puts in a lot of effort to enhance its offerings and guarantee superior performance to those of its rivals. They accomplish this by automating configuration changes, applying an additional layer of verification to find any possible issues, and carefully observing how changes to the infrastructure are affecting it.
Types of Google Compute Engine Families
The four different GCE machine families each have a different value proposition. These robust servers are divided into groups based on their cost, performance, and kind of workload. The GCE machine family kinds are explained in depth below to make it easier for you to understand and select the best option for your desired WordPress site project.
1. General Purpose Machines
This kind focuses primarily on cost-performance, hence several GCE machines and series are available. General Purpose Machine types are further divided into three groups based on cost-performance: cost-optimized, balanced, and scale-out optimised.
Cost-optimized GPMs (E2): The servers used by the E2 virtual machines, also known as cost-optimized GPM, are made for everyday computing. You may use E2 VMs for websites, apps, small- to medium-sized databases, and other microservices, and these machines are less expensive than those of any other family or category.
- E2 Standard
- E2 High Memory
- E2 High-CPU
- E2 Shared-Core
Balanced GPMs (N2, N2D, and N1): There are many different machine series and kinds included in this category. For medium-to-large WordPress blogs or online enterprises, they work well.
- N2 Standard
- N2 High Memory
- N2 High-CPU
- N1 Standard
- N1 High Memory
- N1 High-CPU
- N1 Shared Core
- N2D Standard
- N2D High Memory
- N2D High-CPU
Scale-out Optimised: These are fast computers that are primarily used for scale-out tasks. These devices are perfect for media transcoding, containerized microservices, web services, and other applications.
2. Compute Optimized Machines (C2 and C2D)
For large-scale WordPress enterprises that require a lot of processing power, CO machines are fantastic. These are incredibly powerful computers that can effortlessly manage WordPress sites of any size and type.
- C2D Standard
- C2D High Memory
- C2D High-CPU
- C2 Standard
3. Memory Optimised Machines (M1 and M2)
This machine series is best suited for demanding database applications where memory performance takes precedence over CPU count. There are two varieties displayed here: M1 and M2. Both M1 and M2 are excellent choices for big in-memory databases.
4. Accelerated Optimised Machines (A2)
This new machine family is perfect for heavy computational workloads, deep learning, machine learning, and other applications that call for powerful computers. Here, the machine kinds are differentiated based on GPU count, unlike other family types. Most Hosting providers three different sorts of cloud servers in consideration of your WordPress business and all the GCE family types mentioned before. It provides E2 machines for small-to-medium WordPress websites and online shops. N1HC machines for medium-sized WordPress websites and online shops. C2 machines are best for WordPress blogs and online shops that are both huge and performance-oriented.
How to move a WordPress site from one host to another
There are a few things you need to know if you want to move your WordPress website to Google Cloud. You must first look for a new WordPress host. You must export your material from your existing host, which comes second. You must import your stuff onto your new host, which comes in third. Fourth, you must change your DNS settings. Fifth, make sure your permalinks are updated.
Sixth, you must update your themes and plugins. Seventh, you must make sure everything on the new server functions as it should. Eighth, if everything is running smoothly on the new server, you may cancel your old WordPress hosting account. However, before doing so, make a backup of the complete website so that you have a backup in case something goes wrong.
Overview of the new migration service in GCP
A new migration tool from Google Cloud just made it simple to move your WordPress website to the cloud. You may use this service to speed up the process of moving your WordPress website to Google Cloud by following the instructions in this tutorial. We’ll start by defining migration and outlining potential benefits. Then, we’ll go through some advice for using GCP’s tools for migration as well as some safety measures to take.
We’ll also include advice on how to use GCP’s migration service to switch from another hosting provider. Finally, we’ll mention more WordPress migration techniques that could be more appropriate in some circumstances. A brief glossary will be included in the closing section of this piece to assist readers understand the technical jargon used in it.
A walkthrough of the migration process
- It’s crucial to know that there are two kinds of WordPress hosting: shared and managed, before you start. Although shared hosting is less expensive than managed hosting, it doesn’t provide the same degree of performance or security.
- The first step is to switch to a managed host if your WordPress site is presently hosted on shared hosting. We advise utilising WP Engine since it provides a simple migration method. They will handle all the technical intricacies, leaving you completely worry-free. The monthly cost for WP Engine is the sole drawback.
- In the event you’re experiencing errors through the migration course of, double examine that your WordPress web site and database are suitable with Google Cloud.
- In the event you’re utilizing an older model of WordPress, chances are you’ll must replace your web site earlier than migrating.
- Be sure to have a backup of your web site earlier than migrating. This can enable you to if one thing goes mistaken through the course of.
- Observe the directions fastidiously when migrating your web site.
- You may at all times restore from the backup if there may be any issues or errors.
- After migrating, you need to take a look at your web site to verify it’s working easily on GCP.
- After migrating, all plugins are disabled by default so allow them one after the other to verify they work correctly.
- There is no such thing as a capability to add content material straight out of your web site like there was on earlier internet hosting companies (like SiteGround) so that you’ll have to make use of FTP for importing content material after migrating wordpress to google cloud.
Tips and hints for optimizing performance
- For those who’re planning on migrating your WordPress web site to Google Cloud, the very first thing you’ll must do is export your content material out of your present host.
- Upon getting your content material exported, you’ll must create a brand new WordPress web site on Google Cloud.
- After your new web site is created, you’ll must import your content material into it.
- Now that your web site has been migrated over to Google Cloud, listed below are another optimization ideas: – Allow compression and caching in each Apache and Nginx settings. – Guarantee that file uploads are set to post-only mode in order that guests can’t by accident delete them or change their filenames.
- Lastly, if you wish to migrate your MySQL database as effectively (as a substitute of importing it), there’s an amazing plugin known as WP-CLI for MySQL that may assist make this course of simpler for you!
How to Install WordPress on Google Cloud Hosting
In this technique, I’ll set up a Google VM Instance with a LAMP stack (Linux, Apache, MariaDB, and PHP) and add a WordPress application to it. As a result, you must first register for a Google Cloud Platform account before submitting your credit card information to confirm your identity. I won’t go through the signup procedure because it’s so easy because I’m assuming you’ve already done it.
So let’s get started!
Create a New Compute Engine VM Instance
Upon getting verified your account, you need to open Navigation Menu > Compute Engine > VM Instances.
You won’t see a VM instance on your GCP right now, so click Create. You can select the server configurations and other server settings, including server location, machine type, and much more, on the Create an Instance screen. The server name field is in the first section. I’m giving it the tutorial name “google-server.” Next, pick the server location nearest to your target audience.
The server location is broken down into two parts: Zone and Region. Zone is the deployment area for a server within a region, and Region is the server’s physical location. I would advise you to select the place that is most convenient for your users. The machine configuration section follows, where you may select the machine family, series, and type. There are four possibilities available in the machine family area, as seen in the figure below, and I’ve chosen General-purpose and series E2. You may select the server processing capacity, such as the amount of vCPU and RAM, based on the machine type.
Once there, choose the operating system you wish to install on your Google cloud server by visiting the Boot Disk area. I’m using Debian 10, which is the default. By clicking the change button and choosing your chosen OS, you may change your operating system or switch to a new version, such as CentOS 7. Leave all the parts alone and check both Firewall rules at this time. That is, permit HTTP/HTTPS traffic. The process of creating your virtual machine instance is now complete. Click Create to start up your new server. Your Google cloud server will be created in a matter of minutes.
Deploy the LAMP Stack
It’s time to install the LAMP stack on the new Google cloud server you just successfully established. You must click SSH to start your server’s SSH connection for that. The Google terminal will then appear, where you may launch a number of Linux commands to set up your LAMP stack. All that’s left for you to do is carry out the orders I tell you to run.
- sudo apt update
It will update the list of packages.
- sudo apt upgrade -y
It will upgrade the list of packages
- sudo apt install apache2 -y
Set up Apache2 in your Google cloud server. Now, copy your server IP and open it in a browser to substantiate the profitable set up of Apache. Please be aware that you just haven’t put in an SSL certificates in your Google cloud server, so you have to take away the “S” from HTTPS (browser URL); else, you will note errors like “This website can’t be reached.” You possibly can see within the picture beneath the Apache2 Debian Default Web page efficiently put in on the GC server.
- sudo apt install mariadb-server -y
To install MariaDB on your Google cloud server.
- sudo mysql_secure_installation
To enhance the security of your database installation. After executing the above command, you must input the root password. Because there is no current password, you only need to press Enter. If you wish to change the root password for your database, simply hit “y” and update it. Similarly, you may alter additional security settings. Following that, you must install PHP as well as additional components.
- sudo apt install php7.3 libapache2-mod-php7.3 php7.3-mysql php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-gd php7.3-xml php7.3-intl php7.3-ldap php7.3-zip php7.3-curl -y
Install PHP 7.3 and other modules.
- sudo systemctl restart apache2
To restart the Apache.
Install WordPress Application
Now, you need to install WordPress, and for that, you need to run the following commands:
- sudo mysql -u root -p
To access the DB root and you will need to enter the root password.
Note: Use the password that we have previously set up during the MariaDB installation.
CREATE DATABASE cw; Create a new database.
GRANT ALL PRIVILEGES on cw.* TO ‘farhanuser’@’localhost’ IDENTIFIED BY ‘pass123’; Grant full control and permission to a user.
FLUSH PRIVILEGES; Changes to take effect without restarting the DB service. Now run the exit command to exit.
- cd /var/www/html
Change your directory to the HTML folder.
- sudo apt install wget
Install GNU Wget.
- sudo wget https://wordpress.org/latest.tar.gz
Download the latest WordPress version.
- sudo tar xzvf latest.tar.gz
Extract the archive file.
- sudo chown -R www-data:www-data /var/www/html/wordpress/
- sudo systemctl restart apache2
Restart your Apache2. Now, open the WordPress file (primarily the WordPress web site) within the browser “http://yourIPaddress/wordpress.”
Subsequent, select the language, click on proceed, click on Let’s go! Now, change the DBName, Username, and Password (values whereas creating a brand new DB) and click on Submit to attach the database with WordPress.
Then run the set up and enter the WordPress website info you might be creating and click on Set up WordPress. After that, all it is advisable do is log in to your WordPress dashboard.
For Cpanel customers :
Login to your cPanel account and navigate to Database >> phpMyAdmin.
In case you are not utilizing any internet panel then you will have login to phpMyAdmin utilizing your root MySQL credentials. Subsequent, Choose the database that incorporates your WordPress set up from the listing on the left-hand sidebar.
As soon as you chose the database click on on the export tab from the top navigation menu.
Choose the ‘Export technique’ as Fast, after that select the export ‘Format as SQL. Subsequent click on the ‘Go’ button to start the export course of. After the method is accomplished, a file might be downloaded to your native pc.
1#. Export Your database utilizing a free WordPress Plugin
Login to your current WordPress account and navigate to Plugins >> Add Plugins, Then set up and activate the UpdraftPlus WordPress Backup plugins.
After you will have activated the UpdraftPlus Plugin, Go to ‘Backup/Restore, Then click on the Backup Now button.
Subsequent, choose solely the primary choice which is ‘Embody your database within the backup(…)’. After that, click on the Backup Now button.
After the backup course of is accomplished, Click on the Database button to obtain the SQL database file.
2#. Export the database utilizing Command Line (Terminal)
If in case you have terminal entry then database migration is a straightforward process. In case you are utilizing VPS or Devoted server then absolutely you’ll be able to entry command line, however in case you are utilizing shared internet hosting then it’s important to take permission out of your internet hosting supplier.
Open your server’s terminal then execute the next instructions to finish the export course of. mysql -u root -pThe above command will ask you a password, enter the foundation MySQL password. mysql> SHOW DATABASES;The above command will present all of the accessible databases. mysql> EXIT;
If don’t need any trouble of downloading and importing the SQL file then you must save the file on your current web site’s root listing. The default location of your public HTML root listing is /var/www/html or /var/www/html/wordpress. Go to your public root listing by executing this command: cd /var/www/htmlAfter that, execute the command to create database SQL export file. sudo mysqldump -u -p –opt your-database-name > give-a-file-name.sql
The best way to Obtain the SQL database file? If you happen to save the sql file in your plublic root listing then open the beneath hyperlink in you native pc brouser. http://your-domain-name/your-sql-file-name.sql eg, http://www.siteyaar.com/siteyaar.sqlYou can also use FTP or SFTP to downoad the sql file.
On Google Cloud Server:
After you efficiently created .zip and .sql (database file) in your current web site’s root listing, now’s the time to configure your Google cloud WordPress. Emigrate WordPress to google cloud comply with the GCP WordPress configuration steps:
- Create and import MySQL database.
- Import your exiting WordPress and configure your wp-config.php.
Create New MySQL database:
To finish your WordPress migration on google cloud it’s important to create a brand new MySQL database after which add your current knowledge s to that new database. Beneath, I’ll present you two alternative ways of finishing the method.
In case you are utilizing Google click on to deploy WordPress then you’ll be able to entry phpMyAdmin thorogh your area identify eg, http://instance.com/phpmyadmin, however bitnami WordPress person solely can entry phpMyAdmin by means of puTTy SSH tunneling.
Step 1: Create New Database
Login to phyMyAdmin utilizing your MySQL root credentials. Subsequent, Click on on the ‘New’ button from the top left-hand nook.
On the ‘Create database’ discipline, give a brand new database identify then select the utf8_general_ci. After that, click on the Create button.
Step 2: Import your current database.
Subsequent, click on on the brand new database and navigate to ‘Import’ from the top navigation menu.
To import your current database, click on on Browse and choose the SQL file which you will have downloaded within the earlier step. After that, click on the ‘Go’ button.
Step 3: Create a brand new database person
Now, go to ‘Privileges’ from the top navigation menu. Subsequent click on on ‘Add use account’ button.
Subsequent, sort a brand new person identify on the ‘Username’ discipline. Choose ‘native’ from ‘Host identify’. After that sort a powerful password. Ensure, you allow the ‘Grand all privileges on database ‘your-created-database-name’.
Lastly, click on the ‘Go’ button to create a brand new person.
Utilizing SSH Terminal:
Login to your Google cloud console and navigate to Compute Engine >> VM Situations. Click on the SSH button.
On the SSH terminal execute the next instructions: To open MySQL monitor, sudo mysql – u root -p You can be requested for password, it’s important to enter your MySQL root password. To create new database execute this command beneath: mysql> CREATE DATABASE give-a-database-name CHARACTER SET utf8 COLLATE utf8_general_ci;To create a brand new person execute the command: mysql > CREATE USER ‘wp_wordpres’@’localhost’ IDENTIFIED BY ‘enter new password’;To grant all permition to the brand new person,execute the command: mysql> GRANT ALL ON instance.* TO ‘wp_wordpress’@’localhost’; .mysql> FLUSH PRIVILEGES; mysql> EXIT;
Import your current database.
1#. Add The Information
To import the database file execute the command: cd ~/ wget http://your-domain-name/your-sql-file-name.sql
Click on the settings’ icon from the correct top hand nook and go to Add file choice. Subsequent choose the SQL file.
2#. Import the info tables to your new database
In your ssh terminal execute the command: sudo mysql -u root -p new-created-database-name < your-uploaded-sql-filename
Import your exiting WordPress and configure your wp-config.php
In your SSH terminal execute the next instructions: Navigate to public root listing: #for google click on to deploy cd /var/www/html#For bitnami wordpress cd /decide/bitnami/apps/wordpress/htdocs
Take away the present WP information
Execute the next command to take away the present WordPress information out of your Google cloud. sudo rm -rf *
Add the compress zip file
If you happen to save the compress zip file in public root listing of your current WordPress then execute the command beneath, In any other case it’s important to add it by means of FTP or SFTP. sudo wget http://your-domain-name/your-zip-archive-name
Unzip the information
To unzip the file sort the beneath command and press enter. sudo apt-get set up -y zip unzip sudo unzip your-zip-archive-name.zip
sudo nano wp-config.phpExecute the above command and replace the DB_NAMES, DB_USER, DB_PASSWORD with new database identify, person and password particulars.
Subsequent, use your down arrow button to scroll down. Change the WP_SITEURL and WP_HOME to, Possibility 1, outline(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’); outline(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);Possibility 2, outline(‘WP_SITEURL’, ‘http://35.256.45.4/’); outline(‘WP_HOME’, ‘http://35.256.45.4/’);After you pointed your DNS to google Cloud exterior IP handle change it to love this, outline(‘WP_SITEURL’, ‘http://www.siteyaar.com/’); outline(‘WP_HOME’, ‘http://www.siteyaar.com/’);To save lots of the adjustments press CTRL+O then CTRL+X or CTRL+X then sort Y and ENTER.
Restart Apache and MySQL
Lastly, restart the Apache and MySQL server. For google click on to deploy, sudo systemctl restart apache2 sudo systemctl restart mysqlFor Bitnami wordpress, sudo /decide/bitnami/ctlscript.sh restart apache sudo /decide/bitnami/ctlscript.sh restart mysql
Migrate WordPress to Google Cloud utilizing All-in-One WP Migration plugin:
All-in-One WP Migration plugin is among the greatest WordPress migration plugin accessible available in the market. It may switch your current WordPress to new server with simply three, 4 clicks. Solely drawback, you may face with this plugin is the 512 MB restriction. You can’t import greater than 512 MB with the free model of this plugin. The paid model is accessible at the price of $69 (lifetime).
On current WordPress:
Login to your current WordPress web site, head over to “Add Plugins” and obtain the All-in-One WP Migration plugin.
Activate the All-in-One WP Migration plugin. After that navigate to Export To >File. Then obtain and save the export file in your pc. Ignore this step if you happen to don’t wish to change your current area identify.
If you wish to change your area identify then click on on “ADD”, Then place your present area identify and new area identify. After that create your export file.
On Google Cloud WordPress:
Now login to your new WordPress web site which is in google cloud platform. After that obtain the All-in-One WP Migration plugin and go to Import > Import From > File. Choose the export file that you simply downloaded within the earlier step. NOTE: By default, on the Free model of All-in-One WP Migration plugin, solely permits a most file add measurement of 100 MB. You’ll be able to enhance it to 512 MB by putting in one other free plugin.
In case your most add file measurement is 100 MB or lower than 100 MB, then obtain and set up the All-in-One WP Migration File Extension plugin.
Activate the All-in-One WP Migration File Extension plugin.
All-in-One WP Migration File Extension plugin will enhance the 100 MB cap to 512 MB.
Migrate WordPress to Google Cloud utilizing Duplicator plugin:
On current WordPress:
In your current WordPress, head over to “ADD Plugin” part and Set up the Duplicator plugin.
After you will have put in and activated Duplicator, navigate to the Duplicator >> Packages and click on on the ‘Create New’ button within the top proper nook.
After that, click on the ‘Subsequent’ button. And comply with the steps to Crete your migration package deal.
Guarantee that your scan outcomes don’t have any RED mark or error. Subsequent, Click on the Construct button. This course of will take a number of minutes to finish, the processing time is depended in your current server CPU energy and web site whole measurement.
As soon as the Construct course of is full, you’ll see obtain choices for Installer and Archive package deal. If you happen to click on the One click on Obtain button, it would obtain each the information in your Pc.
After you will have downloaded the installer.php and *archive.zip information, go to your browser’s obtain part and duplicate and save the archive.zip file hyperlink.
On Google Cloud WordPress:
Login to your Google cloud console and navigate to COMPUTE ENGINE > VM INSTANCES. Subsequent click on on the SSH button to open the terminal. There are one other choices to SSH into google cloud. The very first thing that you must maintain is MySQL Database. You’ve two choices, You should utilize your current MySQL database (on google cloud) or you’ll be able to create a brand new MySQL database. If you wish to create new database, then comply with the MySQL database create part on ‘The best way to Manually Migrate WordPress to Google Cloud:’.
The best way to use your current MySQL Database on google cloud?
To make use of your current MySQL database it’s important to be aware down DB_NAME (Database identify), DB_USER(database username), DB_PASSWORD (database person password), DB_HOST (database host) out of your wp-config.php file. For Google click on to deploy WordPress customers: Open the SSH terminal, execute the command beneath: cd /var/www/html sudo nano wp-config.php
For Bitnami WordPress customers: Open the SSH terminal and execute the next instructions beneath: cd /decide/bitnami/apps/wordpress/htdocs sudo nano wp-config.php
2#. Empty your root WordPress listing.
Go to SSH terminal and execute the next instructions: On click on to deploy WordPress cd /var/www/html sudo rm -rf *On Bitnami WordPress cd /decide/bitnami/apps/wordpress/htdocs sudo rm -rf *
3#. Add Installer.php
On the correct top nook of your Google cloud internet ssh terminal, Click on the setting emblem button. After that click on the add file button and add the installer.php file. After that execute the next instructions: On click on to deploy WordPress, sudo mv ~/installer.php /var/www/html/On Bitnami WordPress, sudo mv ~/installer.php /decide/bitnami/apps/wordpress/htdocs
4#. Add archive.zip file:
You should utilize SFTP OR FTP to add the archive zip file, however right here I’ll present you somewhat simpler means of doing it. I already advised you to repeat the archive.zip URL, right here is the time to make use of it.
On click on to deploy WordPress, cd /var/www/html/ sudo wget paste-the-archive.zip-urlOn Bitnami WordPress, cd /decide/bitnami/apps/wordpress/htdocs sudo wget paste-the-archive.zip-url
5#. Begin the Duplicator Migration Course of
Go to your Google Cloud Console panel and navigate to Compute Engine > VM Situations, and duplicate your Exterior IP handle. After that open the beneath hyperlink in your browser. Your -external-IP/installer.php eg, 126.96.36.199/installer.php
The Duplicator will run a couple of checks and present you “go” subsequent to archive and validation checks, You’ll want to test the phrases & situations checkbox and proceed by clicking on the Subsequent button.
Now, Duplicator might be requested you to enter your MySQL database particulars. Now, enter the database particulars which you famous down from wp-config.php within the earlier step. If you happen to created a brand new knowledge base then enter the small print of that database. You’ll be able to click on on the ‘Check Database’ button to be sure to entered the proper info. After that click on on ‘Subsequent’.
Now, Duplicator will ask you to replace web site URL. Don’t change the URL to your area identify, except you level your DNS to google cloud VM exterior IP handle. I like to recommend you to check the migrated web site completely, earlier than you level the DNS to google cloud.
Now you can login to your WordPress web site on the Google cloud.
Replace Your Area Identify Servers (DNS)
At this level, you will have created an entire copy of your WordPress web site on google cloud platform which you’ll be able to entry by means of your VM’s Exterior IP handle. To entry your Google cloud WordPress by means of your area, it’s important to factors your DNS to Google Cloud VM Situations exterior IP handle. In case your current internet hosting supplier is a handle host akin to a2hosting, siteground, namechape, godady and so forth, then it’s extra doubtless you’re utilizing their default DNS server. Although you need to use their DNS server for testing functions however I don’t advocate utilizing it as major DNS server, as a result of when your subscription package deal ended they could delete your IP data from their DNS server.
Not advisable: The best way to use your current supplier DNS server?
Login to your cPanel and navigate to DOMAINS >> Zone Editor >> Handle. After that change the “A” report to google cloud exterior IP handle.
The advisable means: To replace your area, I Advocate you to change your DNS nameservers to Cloudflare/AWS DNS (Router 53)/Google Cloud DNS. You can also use your area register default DNS server, however they’re much slower than the advisable ones. For the sake of this information, I might be displaying you change DNS nameservers with GoDaddy, NameCheap. Relying in your area registrar, the screenshots could look totally different. Nevertheless, the idea idea and performance is similar.
Login to your GoDaddy account after which navigate to Area Supervisor >> DNS. After that, scroll all the way down to ‘Nameservers’.
Possibility 1: Use your area registrar DNS Server
To make use of your area registrar (right here godaddy) DNS server as your major DNS server choose ‘Default’ from ‘Select your new nameserver sort’ discipline.
After that, click on on save button and reload the web page out of your internet browser.
After the web page is reloaded , you will note some new choices. Now, Click on the pencil emblem, in your right-hand facet to edit the ‘A’ report.
Subsequent, place your Google cloud server IP handle on ‘Factors to’ discipline. Then click on the save button. @ imply your area identify.
To arrange with third social gathering DNS supplier akin to Cloudflare(as DNS), google cloud DNS, AWS route 53 and so forth, choose customized from ‘Select your new nameserver sort’ discipline. After that, click on on save button. To finish your arrange it’s important to add ‘A’ report out of your DNS suppliers admin console.
Login to your NameCheap account, then navigate to Area listing >> Area. After that scroll all the way down to ‘NAMESERVERS’.
Possibility 1: Use your area registrar DNS Server
To make use of your default Namecheap DNS server, select the ‘Namecheap BasicDNS’ from NAMESERVERS discipline. After that click on on the correct emblem to avoid wasting the setting.
Subsequent, navigate to Superior DNS and add or replace the/a ‘A’ report to google cloud exterior IP Tackle. ‘@’ signify your area identify.
Picture: We’re utilizing Google Cloud DNS as our DNS server.
To arrange with third social gathering DNS supplier akin to Cloudflare(as DNS), google cloud DNS, AWS route 53 and so forth, choose Customized DNS from ‘NAMESERVERS’ discipline and add nameservers. After that, click on on the correct emblem to avoid wasting the settings. To finish your arrange it’s important to add ‘A’ report out of your DNS suppliers admin console.
Use Cloudflare as DNS server
These days, Cloudflare is a very fashionable CDN supplier round web site homeowners. It’s possible you’ll use Cloudflare as a CDN however what you don’t find out about is, you need to use Cloudflare as a DNS supplier.
Login to your Cloudflare account after which click on on add a brand new web site. After that copy the NS data, and place the NS data in your domains registrar’s nameserver discipline.
Subsequent, Click on the DNS button from the to navigation menu.
NOW, Click on on ‘Add report’, and choose the Kind as A, Identify as @, on IPv4 handle discipline place your server IP handle. Then click on the save button.
After that, add an one other ‘A’ report for www subdomain.
Now Click on on Orange cloud emblem button (below ‘Proxy standing’) to make use of Cloudflare as a DNS supplier.
The best way to arrange and connect with your Google Cloud server
Now that you simply’ve taken stock of your present server, go and register and set up your Google Cloud server. After getting registered for a Google Cloud account, you’ll be able to start organising a VM (Compute Engine) to host your WordPress content material. Google Cloud server (Compute Engine) permits customers to attach utilizing SSH from the browser window to their digital machine (VM) occasion from inside the Google Cloud Console. SSH from the browser helps the next:
- Internet browsers
- Newest model of Google Chrome
- Microsoft Edge
- Microsoft Web Explorer 11 and later
- Safari eight and later. Word that Safari in non-public browser mode just isn’t supported.
- Digital machine configurations
- All Linux VM photos which might be natively accessible in Google Cloud.
No further software program or browser extensions wanted. Merely login to Google Cloud Console, and go to Menu ==> Compute Engine ==> VM cases. Within the listing of digital machine cases, click on SSH within the row of the occasion that you simply wish to connect with.
Alternatively, you’ll be able to open an SSH connection to an occasion by clicking its identify and clicking SSH from the occasion particulars web page. A SSH terminal window will open with the Ubuntu Linux occasion that was created within the second posts of the sequence. You need to now be capable of run instructions in Ubuntu Linux created on Google Cloud server.
Set up LAMP or LEMP on new server earlier than migration
Now that you’ve got taken stock of your present server, and you know the way to hook up with your Google Cloud server, use the put up beneath to put in LAMP or LEMP in your new Google server. Your objective is to verify the brand new Google server has all of the servers and packages as the present server. We’ve listed some useful posts above that you need to use to put in Apache or Nginx, MySQL or MariaDB or PHP. Another posts that you could be wish to use when putting in LAMP or LEMP on Ubuntu Linux.
You should utilize the posts above to put in the identical servers and packages you will have put in in your present server. If you wish to set up particular packages in your new server, then use the identical posts talked about above. As soon as all of the packages are put in, you’ll be able to then start transferring content material out of your present server to the brand new server.
Configure your new Google server much like your present server
Previous to migration, you’ll wish to be certain that your new Google server is nearly or precisely like your present server. Ensure the net server (Apache or Nginx) settings are the on each previous and new servers, together with the identical listing construction, and Virtual Host or Server block content material.
- Apache listing: /and so forth/apache2/
- Nginx listing: /and so forth/nginx/
Your PHP configuration also needs to be similar to your present server’s PHP settings. Use the put up above to put in particular PHP model, in addition to all of the modules at present put in in your present server.
- PHP listing: /and so forth/php/
Your MySQL or MariaDB configurations also needs to mimic your present server. Validate every file, listing and different knowledge to be sure that your new server isn’t any totally different out of your present server earlier than migration.
- MySQL / MariaDB listing: /and so forth/mysql/
When you’ve that executed, you’ll be able to proceed with the migration course of.
Back up current server data and database before migration
Now that you’ve installed LAMP or LEMP on your new server and configured it to be identical or very similar to your present server, it’s time to backup the material on the old server and migrate it to the new server. There are two critical files that must be transferred to the new server. You will require WordPress website content as well as database content. Back up both the website content and the database content. At this point, you should halt all modifications on your existing server before backing it up, since you do not want any new changes to be made after the backup. Log in to your server using SSH if you have access to back up WordPress content.
Once you’re on your current server’s SSH interface, perform the instructions below to back up your WordPress content, which should be saved in the following directory: /var/www/html/. When you run the scripts below, a backup file named current-server-backup.tar will be produced with your WordPress content. current-server-backup.tar /var/www/html/ sudo tar -cvf Back up your database content next.
You must use the root account or an account that has full access to the database you want to backup. To backup all databases on the server, use the following commands: > all databases backup.sql sudo mysqldump -u username -p —all-database In addition, a file called all databases backup.sql should be produced in the current working directory. There should be two files now: current-server-backup.tar and all database backup.sql.
Copy the current server’s content to Google Cloud server
At this point, you should be able to replicate the content of your current server to your new server. There are several methods for transferring the tar file and SQL data file to the new server. You may use the rsync command from the new server by SSHing into it and entering a command identical to the one given below (changing the host names as needed). Run the instructions below while connected to your Google Cloud interface to connect to your existing server and copy over the backed up material. firstname.lastname@example.org:/home/username>/all database backup.sql rsync -avz email@example.com:/home/username>/current-server-backup.tar rsync -avz
You might alternatively use scp to copy your files safely; the syntax is as follows: scp firstname.lastname@example.org:/home/username>/all database backup.sql /home/username/ scp email@example.com:/home/username>/current-server-backup.tar /home/username/ scp firstname.lastname@example.org:/home/username>/current-server-backup.tar /home/username/ If you can’t access the files through SSH, use the wget command to download them to your new Google Cloud server. To use the instructions below, you must first copy the files to the current server’s web server root directory. wget /cd wget http://old-website.com/all database backup.sql http://old-web-site.com/current-server-backup.tar Once the files have been moved to your new server, go to the next section to extract them and import the database content into your database server.
Restore current server’s content onto Google Cloud server
After copying the existing server’s content to your new server, use the instructions below to extract the archive content and copy the website content to your html directory, just as you did on your current server. current-server-content.tar tar -xvf sudo cp -rf /var/www/html/ sudo cp -rf /var/www/html/ Then, use the following commands to import the database content to your database servers. sudo mysql -u root -p backup all database.sql
At this time, your Google server should have both the current server content and the database content. Execute the instructions below to change the existing permissions to match the current server. Check that all of your current server’s configurations match those of your new Google Cloud server. Restart your webserver after everything has been confirmed. sudo systemctl nginx restart restart apache2 with sudo systemctl If you receive an error, make sure you rectify it.
Update your DNS and point your domain to your new Google server IP address
Previous to going reside and updating your DNS A data to level to your new server, you possibly can check domestically by enhancing your/and so forth/hosts or hosts file on Home windows. Level your area to your new IP handle, and browse to it. If it seems with no error, then you possibly can replace your public DNS A report to level to your new Google server IP handle. As soon as your native check is profitable, go to your DNS supplier portal, login and replace the DNS A report to level to your new server IP handle. If every thing works, you possibly can proceed fine-tuning your new server to verify all is configured accurately. That ought to do it!
Conclusion: This put up confirmed you easy methods to migrate a WordPress web site to Google Cloud server. For those who discover any error above or have one thing so as to add, please use the remark type beneath.
WordPress Migration FAQ
Can Hostinger Migrate a WordPress Site for Me?
Absolutely. All you need to do is add a request on the Migration Requests page of hPanel. Once your credentials are verified, Hostinger will migrate your WordPress site for free.
Can I Migrate My WordPress Site to Another Host?
Yes, you can. There are various methods to move your WordPress site to a new hosting provider.
How Do I Migrate My WordPress to Another Host?
To migrate a WordPress site, you must transfer your WordPress files and databases from the old web host to the new one. You can choose to do this manually via FTP or by using tools such as a cloning plugin, an automatic migration tool, or the web hosting’s backup service.
Conclusion – How to Migrate WordPress to Google Cloud.
Migrating a WordPress website to a new hosting service can bring several benefits. You may be able to get a more affordable plan, better customer support, more hosting resources and features, and better server security. As there are several ways of accomplishing this, make sure to consider your personal needs and the necessary technical knowledge. Here’s a recap of the four WordPress migration methods we have explored:
- Manual transfer. Use an FTP consumer or the File Supervisor of the host’s management panel to switch WordPress recordsdata and databases.
- Cloning plugin. Use a plugin to export and import WordPress recordsdata with just some clicks.
- Automated migration device. For those who’re migrating to Hostinger, you’ll be able to shortly do it by submitting a migration request.
- Webhosting backup service. Use the backups created by the previous internet hosting plan to maneuver your WordPress recordsdata to the brand new server.