Joomla Migration to Google Cloud: Step-by-Step Guide
- The latest version of Google Chrome
- Firefox
- Microsoft Edge
- Microsoft Internet Explorer 11 and later
- Safari 8 and later. Note that Safari is not supported in private browser mode.
- Virtual machine configurations
- All Linux VM images are natively available in Google Cloud.
- Connecting to an instance without a public IP address
- Connecting to an instance with a private IP address
- Connecting to an instance with a private IPv6 address
No additional software or browser extensions are needed. Log in to Google Cloud Console and go to Menu ==> Compute Engine ==> VM instances.
In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

Alternatively, you can open an SSH connection to an instance by clicking its name and SSH from the instance details page.
An SSH terminal window with the Ubuntu Linux instance created in the series’s second post will open.
You should now be able to run commands in Ubuntu Linux created on the Google Cloud server.

Install LAMP or LEMP on the new server before migration
Your new Google Cloud server needs the same software stack, such as LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP), as your current Joomla site. This software stack ensures all necessary servers and packages install correctly, matching your old setup. You can find guides to install Apache, Nginx, MySQL, MariaDB, or PHP to prepare your server for the migration.
Your goal is to ensure the new Google server has all the servers and packages that are the same as the current server. We’ve listed some helpful posts that you can use to install Apache, Nginx, MySQL, MariaDB, or PHP.
You may want to use some other posts when installing LAMP or LEMP on Ubuntu Linux.
- How to install Apache on a Google Cloud server (alternative to Nginx)
- How to install Nginx on a Google Cloud server (alternative to Apache)
- How to install PHP on a Google Cloud server
- How to install MySQL or MariaDB database server
- How to install Apache on Ubuntu Linux
- How to install Nginx on Ubuntu Linux
- How to install MySQL server on Ubuntu Linux
- How to install MariaDB on Ubuntu Linux
- How to install PHP on Ubuntu Linux
You can use the posts above to install the same servers and packages you have installed on your current server. However, use the identical posts mentioned above to install specific packages on your new server.
Once all the packages are installed, you can transfer content from your current server to the new one.
Configure your new Google server similar to your current server
Joomla server settings for your new Google Cloud environment must match your old Joomla server settings for a correct transition. Align web server settings, such as folder structures and Virtual Host or Server block details, for Apache or Nginx. Ensure PHP settings are also identical on both servers, as matching PHP settings maintains functionality across two distinct environments.
- Apache directory: /etc/apache2/
- Nginx directory: /etc/nginx/
- Virtual Host configuration (Apache)
- Server Block configuration (Nginx)
Your PHP configuration should also be identical to your current server’s PHP settings. Use the post above to install a specific PHP version and all the modules on your current server.
- PHP directory: /etc/php/
- PHP settings (e.g.,
memory_limit,upload_max_filesize)
Your MySQL or MariaDB configurations should also mimic your current server. Validate each file, directory, and other data to ensure your new server is no different from your current server before migration.
- MySQL / MariaDB directory: /etc/mysql/
- MySQL/MariaDB configuration files
- User privileges and grants
Once you have that done, you can continue with the migration process.
Back up current server data and database before migration
A Joomla site backup of website files and the database from your current server protects your data during the move to Google Cloud. This Joomla site backup acts as a safety net. You can restore your Joomla site using this backup if any issues arise during the Google Cloud migration process.
First, you need the Joomla website content and database content. Back up the website content as well as the content in the database.
Stopping new changes before the Joomla backup ensures the backup accurately reflects the site’s state at that specific moment. This prevents data discrepancies.
Joomla content backup requires logging onto the server using SSH, a secure computer connection method. After connecting to the current server’s SSH console, users run specific commands to back up Joomla content. This backup process targets the `/var/www/html/` directory, which typically stores website files.
When you run the commands below, a backed-up file named current-server-backup.tar will be created with your Joomla content.
A database backup uses a root account or an account with full database access, ensuring all database information saves before migrating Joomla to Google Cloud. Joomla version 3.9 completed this migration process. This backup protects your data.
To backup all databases on the server, you run the commands below:
A file named `all_databases_backup.sql` creates a complete copy of all your website’s data. Storing this backup file in the current working directory ensures immediate accessibility for the migration process.
You should now have two files: current-server-backup.tar and all_database_backup.sql.
Copy the current server’s content to the Google Cloud server
Copying current server content to the new Google Cloud server is the next step. Users can transfer tar and SQL data files to the new server using several methods.
You can use the rsync command from the new server by SSHing it and a command similar to that shown below (changing the host names as needed).
While connected to your Google Cloud console, run the commands below to connect to your current server and copy over the backed-up content.
Secure Copy Protocol (SCP) securely copies Joomla website files, using encryption to protect website data during transfer. The SCP command `scp -r /path/to/local/joomla/files username@google_cloud_ip:/path/to/remote/directory` encrypts data during transit.
scp user@old-server.com:/home/<username>/all_database_backup.sql /home/username/ scp user@old-server.com:/home/<username>/current-server-backup.tar /home/username/
scp -r username@current_server_ip:/path/to/joomla/files /path/to/destination/on/new/server
If you can’t get the files using SSH, then you can use the wget command to download the files to your new Google Cloud server.
You must copy the files to the current server web server root directory to be able to use the commands below.
cd ~ wget http://old-web-site.com/all_database_backup.sql wget http://old-web-site.com/current-server-backup.tar
wget http://current_server_ip/path/to/joomla/files/current-server-backup.tar
Once the files are copied to your new server, continue to extract them below and import the database content into your database server.
Restore the current server’s content to the Google Cloud server
After backing up your Joomla site, restore the Joomla site backup onto your new Google Cloud server. Transfer website files and database information to their correct locations on the new Google Cloud server. This restoration process uses commands to copy files and import database information, making your Joomla site live on the Google Cloud server.
tar -xvf current-server-content.tar sudo cp -rf /var/www/html/ /var/www/html/
tar -xvf current-server-backup.tar mysql -u root -p database_name < all_databases_backup.sql
Next, run the commands below to import the database content to your servers.
Commands must run after copying server and database information to the Google Cloud server. These commands set correct file and folder permissions on the Google Cloud server. Setting these permissions ensures the Google Cloud server's settings match the original server's setup, preventing website access problems.
Confirm that all website settings on your old server precisely match the settings on the new Google Cloud server before restarting the web server. This verification step ensures a smooth website transition and confirms that your Joomla migration is complete.
sudo systemctl restart nginx sudo systemctl restart apache2
sudo chown -R www-data:www-data /var/www/html sudo chmod -R 755 /var/www/html
If you get an error, make sure to resolve it.
Update your DNS and point your domain to your new Google server IP address
Once your Joomla site is working correctly on Google Cloud, update your domain's DNS settings to direct visitors to your new home. Log in to your DNS provider and change the DNS A record to point to your new Google server's IP address. This ensures that when people type your website address, they are sent to the site on Google Cloud.
Once your local test is successful, log in to your DNS provider portal and update the DNS A record to point to your new server IP address.
If everything works, you can continue fine-tuning your new server to ensure everything is configured correctly.
And that's how you migrate your Joomla site to Google Cloud.
Conclusion:
This Joomla migration guide explains how to move a Joomla website to a Google Cloud server. You can share feedback or report errors using the comment form located below the guide.
Migrating your Joomla website to Google Cloud offers a way to move your site without visitors noticing any downtime.
Joomla migration means moving your website's files, database, and settings to a new place online. This guide focuses on moving your Joomla site to Google Cloud Platform (GCP), Google's powerful servers. GCP provides services that make hosting your Joomla website easier and more reliable.
This process lets you move Joomla from your computer or another web host to GCP. You'll set up your Google Cloud server and get your Joomla application ready for the move. The steps cover everything from preparing your cloud server to updating your website's address so visitors find it at the new location.
Migrate your Joomla site by first inventorying your current server for web server, database, and PHP versions. Then, set up your Google Cloud server via the Google Cloud Console. Finally, install LAMP or LEMP on your new server to match your current setup.
Taking inventory of a Linux server before migration
Before migrating your Joomla site to Google Cloud, understanding your current Linux server's details is essential. You'll need to know your web server, database, and PHP versions, along with any add-ons and service configurations. These details help you accurately replicate your existing setup on Google Cloud.
Gather the following information:
- Web server and version number
- Database server and version number
- PHP and related modules
- Other servers and services and how they're configured
- Web server and version
- Database server and version
- PHP and related modules
- Other servers and services and their configurations
If you're using Apache, here's how to check its version on Ubuntu.
apache2 -v
sudo apache2 -v
For more in-depth checks and installation steps, check out this guide:
How to check and install specific Apache versions on Ubuntu Linux
If you're using Nginx, here's how to check its version on Ubuntu.
nginx -v
nginx -v
For more in-depth checks and installation steps, check out this guide:
How to check and install specific Nginx versions on Ubuntu Linux
To check what version of PHP is installed and how to install a specific version on Ubuntu Linux, read the post below:
How to check and install specific PHP versions on Ubuntu Linux
Whether you're running MySQL or MariaDB, the post below shows you how to determine which version of MySQL or MariaDB runs on Ubuntu Linux.
How to find what version of MySQL or MariaDB runs on Ubuntu Linux
How to set up and connect to your Google Cloud server
Setting up your Google Cloud server, called a Compute Engine instance, is like preparing a new virtual computer for your Joomla site. You can securely connect to this server using SSH (Secure Shell) directly from your web browser through the Google Cloud Console. This provides a safe command-line connection for managing your new environment.
Your Google Cloud server, which is a Compute Engine instance, allows you to connect using SSH, a secure command-line interface, directly from your browser within the Google Cloud Console.
SSH from the browser supports the following:
- Web browsers
- The latest version of Google Chrome
- Firefox
- Microsoft Edge
- Microsoft Internet Explorer 11 and later
- Safari 8 and later. Note that Safari is not supported in private browser mode.
- Virtual machine configurations
- All Linux VM images are natively available in Google Cloud.
- Connecting to an instance without a public IP address
- Connecting to an instance with a private IP address
- Connecting to an instance with a private IPv6 address
No additional software or browser extensions are needed. Log in to Google Cloud Console and go to Menu ==> Compute Engine ==> VM instances.
In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

establish ssh connection to vm instances Alternatively, you can open an SSH connection to an instance by clicking its name and SSH from the instance details page.
An SSH terminal window with the Ubuntu Linux instance created in the series's second post will open.
You should now be able to run commands in Ubuntu Linux created on the Google Cloud server.

connect to google cloud instance host
Install LAMP or LEMP on the new server before migration
Your new Google Cloud server needs the same software stack, such as LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP), as your current Joomla site. This software stack ensures all necessary servers and packages install correctly, matching your old setup. You can find guides to install Apache, Nginx, MySQL, MariaDB, or PHP to prepare your server for the migration.
Your goal is to ensure the new Google server has all the servers and packages that are the same as the current server. We've listed some helpful posts that you can use to install Apache, Nginx, MySQL, MariaDB, or PHP.
You may want to use some other posts when installing LAMP or LEMP on Ubuntu Linux.
- How to install Apache on a Google Cloud server (alternative to Nginx)
- How to install Nginx on a Google Cloud server (alternative to Apache)
- How to install PHP on a Google Cloud server
- How to install MySQL or MariaDB database server
- How to install Apache on Ubuntu Linux
- How to install Nginx on Ubuntu Linux
- How to install MySQL server on Ubuntu Linux
- How to install MariaDB on Ubuntu Linux
- How to install PHP on Ubuntu Linux
You can use the posts above to install the same servers and packages you have installed on your current server. However, use the identical posts mentioned above to install specific packages on your new server.
Once all the packages are installed, you can transfer content from your current server to the new one.
Configure your new Google server similar to your current server
Joomla server settings for your new Google Cloud environment must match your old Joomla server settings for a correct transition. Align web server settings, such as folder structures and Virtual Host or Server block details, for Apache or Nginx. Ensure PHP settings are also identical on both servers, as matching PHP settings maintains functionality across two distinct environments.
- Apache directory: /etc/apache2/
- Nginx directory: /etc/nginx/
- Virtual Host configuration (Apache)
- Server Block configuration (Nginx)
Your PHP configuration should also be identical to your current server's PHP settings. Use the post above to install a specific PHP version and all the modules on your current server.
- PHP directory: /etc/php/
- PHP settings (e.g.,
memory_limit,upload_max_filesize)
Your MySQL or MariaDB configurations should also mimic your current server. Validate each file, directory, and other data to ensure your new server is no different from your current server before migration.
- MySQL / MariaDB directory: /etc/mysql/
- MySQL/MariaDB configuration files
- User privileges and grants
Once you have that done, you can continue with the migration process.
Back up current server data and database before migration
A Joomla site backup of website files and the database from your current server protects your data during the move to Google Cloud. This Joomla site backup acts as a safety net. You can restore your Joomla site using this backup if any issues arise during the Google Cloud migration process.
First, you need the Joomla website content and database content. Back up the website content as well as the content in the database.
Stopping new changes before the Joomla backup ensures the backup accurately reflects the site's state at that specific moment. This prevents data discrepancies.
Joomla content backup requires logging onto the server using SSH, a secure computer connection method. After connecting to the current server's SSH console, users run specific commands to back up Joomla content. This backup process targets the `/var/www/html/` directory, which typically stores website files.
When you run the commands below, a backed-up file named current-server-backup.tar will be created with your Joomla content.
A database backup uses a root account or an account with full database access, ensuring all database information saves before migrating Joomla to Google Cloud. Joomla version 3.9 completed this migration process. This backup protects your data.
To backup all databases on the server, you run the commands below:
A file named `all_databases_backup.sql` creates a complete copy of all your website's data. Storing this backup file in the current working directory ensures immediate accessibility for the migration process.
You should now have two files: current-server-backup.tar and all_database_backup.sql.
Copy the current server's content to the Google Cloud server
Copying current server content to the new Google Cloud server is the next step. Users can transfer tar and SQL data files to the new server using several methods.
You can use the rsync command from the new server by SSHing it and a command similar to that shown below (changing the host names as needed).
While connected to your Google Cloud console, run the commands below to connect to your current server and copy over the backed-up content.
Secure Copy Protocol (SCP) securely copies Joomla website files, using encryption to protect website data during transfer. The SCP command `scp -r /path/to/local/joomla/files username@google_cloud_ip:/path/to/remote/directory` encrypts data during transit.
scp user@old-server.com:/home/<username>/all_database_backup.sql /home/username/ scp user@old-server.com:/home/<username>/current-server-backup.tar /home/username/
scp -r username@current_server_ip:/path/to/joomla/files /path/to/destination/on/new/server
If you can't get the files using SSH, then you can use the wget command to download the files to your new Google Cloud server.
You must copy the files to the current server web server root directory to be able to use the commands below.
cd ~ wget http://old-web-site.com/all_database_backup.sql wget http://old-web-site.com/current-server-backup.tar
wget http://current_server_ip/path/to/joomla/files/current-server-backup.tar
Once the files are copied to your new server, continue to extract them below and import the database content into your database server.
Restore the current server's content to the Google Cloud server
After backing up your Joomla site, restore the Joomla site backup onto your new Google Cloud server. Transfer website files and database information to their correct locations on the new Google Cloud server. This restoration process uses commands to copy files and import database information, making your Joomla site live on the Google Cloud server.
tar -xvf current-server-content.tar sudo cp -rf /var/www/html/ /var/www/html/
tar -xvf current-server-backup.tar mysql -u root -p database_name < all_databases_backup.sql
Next, run the commands below to import the database content to your servers.
Commands must run after copying server and database information to the Google Cloud server. These commands set correct file and folder permissions on the Google Cloud server. Setting these permissions ensures the Google Cloud server's settings match the original server's setup, preventing website access problems.
Confirm that all website settings on your old server precisely match the settings on the new Google Cloud server before restarting the web server. This verification step ensures a smooth website transition and confirms that your Joomla migration is complete.
sudo systemctl restart nginx sudo systemctl restart apache2
sudo chown -R www-data:www-data /var/www/html sudo chmod -R 755 /var/www/html
If you get an error, make sure to resolve it.
Update your DNS and point your domain to your new Google server IP address
Once your Joomla site is working correctly on Google Cloud, update your domain's DNS settings to direct visitors to your new home. Log in to your DNS provider and change the DNS A record to point to your new Google server's IP address. This ensures that when people type your website address, they are sent to the site on Google Cloud.
Once your local test is successful, log in to your DNS provider portal and update the DNS A record to point to your new server IP address.
If everything works, you can continue fine-tuning your new server to ensure everything is configured correctly.
And that's how you migrate your Joomla site to Google Cloud.
Conclusion:
This Joomla migration guide explains how to move a Joomla website to a Google Cloud server. You can share feedback or report errors using the comment form located below the guide.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!