Skip to content
Follow
CMS Ubuntu Linux

Joomla Migration to Google Cloud: Step-by-Step Guide

Richard
Written by
Richard
Dec 30, 2021 Updated Oct 9, 2026 20 min read
How to Install Nextcloud AIO on Ubuntu Linux
How to Install Nextcloud AIO on Ubuntu Linux

A Joomla migration to Google Cloud moves your website files, database and settings to a virtual machine on Google’s servers. The goal is better speed and performance. Google Cloud Platform (GCP) gives you a stable server environment with 99.9% uptime for your site.

Advertisement

For a small site, you can finish the server setup, file transfer and domain update in under an hour by following the steps below. Larger sites take longer, mostly because of the backup and copy steps. Keep your old site running until the new one is tested. That way you can roll back at any point.

⚡ Quick Answer

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.

Advertisement

Taking inventory of a Linux server before migration

Before you touch Google Cloud, take inventory of your current Linux server. Check which web server software, database version and PHP setup your Joomla site runs on. Record the exact package versions and service settings from your old host. You will match them on Google Cloud, which prevents version-related errors such as a white page or a database connection failure.

Joomla is strict about PHP and database versions. A site built on one PHP version can break on a newer or older one. Check your Joomla version’s requirements before you pick versions for the new server. The process in this guide was completed with Joomla 3.9.

Gather the following information from your current server:

  • Web server and version
  • Database server and version
  • PHP and related modules
  • Other servers and services and their configurations

Write the results in a text file and keep it open. You will refer to it when you install packages on the new server. The version checks for each component are further down this page.

Advertisement
  • Web server and version number
  • Database server and version number
  • PHP and related modules
  • Other servers and services and how they're configured
  • Before you connect to the new server, check that your browser and VM setup are supported. The browser-based SSH window in the Google Cloud Console works with these browsers and instance types:

    • Web browsers
      • The latest version of Google Chrome
      • Firefox
      • Microsoft Edge
      • Microsoft Internet Explorer 11 and later
      • Safari 8 and later. 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. If the SSH window does not open, check that your browser is not blocking pop-ups for the Google Cloud Console. Follow these steps to connect:

    1. Log in to the Google Cloud Console.
    2. Go to Navigation menu > Compute Engine VM instances You should see a list of your virtual machine instances.
    3. Find the row of the instance you want to connect to and click SSH. A new browser window opens. The first connection can take a few seconds while the console prepares the SSH keys.
    establish ssh connection to vm instances
    establish ssh connection to vm instances

    Alternatively, click the instance name to open the instance details page, then click SSH there. Both routes open the same connection.

    An SSH terminal window opens with the Ubuntu Linux instance you created in the second post of this series. You should now be able to run commands in Ubuntu Linux on the Google Cloud server. If you see a command prompt, the connection works.

    Advertisement
    connect to google cloud instance host
    connect to google cloud instance host

    Install LAMP or LEMP on the new server before migration

    Install a LAMP or LEMP stack on the new server before you move anything. LAMP is Linux, Apache, MySQL or MariaDB, and PHP. LEMP swaps Apache for Nginx. Use the same web server, database and PHP versions you recorded from your old server. Matching them keeps your Joomla files and database from hitting compatibility errors.

    Helpful posts exist for installing Apache, Nginx, MySQL, MariaDB and PHP on Ubuntu Linux. Use them as you work through your inventory list.

    Install only the servers and packages your current server uses. Do not add extras "just in case". If your old server runs Apache, you do not need Nginx on the new one. Pick the specific version and modules from your inventory instead of taking whatever the default is.

    Advertisement

    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

    Next, make the new server's configuration match the current one. Copy over the web server folder structure, the Apache Virtual Host or Nginx Server Block rules, and the PHP settings. Matching these parameters makes your Joomla site behave the same way in the new environment.

    Compare the web server settings on the old and new servers. This includes the same directory structure and the same Virtual Host or Server block content. Open the files on the old server, compare them with the new server, and copy across the lines that matter. Change values that are specific to the old server, such as paths that differ or the IP address.

    Advertisement
    • 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 PHP post above to install the specific PHP version and all the modules your current server has. Then compare the settings, especially the ones that affect uploads and memory.

    • PHP directory: /etc/php/
    • PHP settings (e.g., memory_limit, upload_max_filesize)

    Your MySQL or MariaDB configuration should also mimic your current server. Validate each file, directory and other piece of data so the new server does not differ from your current one before migration. Pay attention to user privileges and grants. A missing grant is a common reason Joomla cannot connect to its database after a move.

    • 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

    Advertisement

    The backup has two parts: an archive of all website files and a full SQL dump of the database. This backup is your safety net. If any part of the transfer fails, you can restore the Joomla site from it. Do not skip it, even if the old server will stay online.

    First, you need the Joomla website content and the database content. Back up both.

    Stop new changes before you back up. In the Joomla administrator, set the site offline under System Global Configuration, on the Site tab, with Site Offline set to Yes. Then no one posts comments, registers or edits articles while the backup runs. The backup then reflects the site's state at that moment, and you avoid mismatches between files and database. Set the site back online on the old server if you need to roll back.

    The content backup needs a login to the old server over SSH, a secure computer connection method. Connect to the current server's SSH console and run the backup commands there. The backup targets the /var/www/html/ directory, which typically holds the website files. Your web root may be different, so check your web server configuration.

    Advertisement

    When the commands finish, a backup archive named current-server-backup.tar exists with your Joomla content.

    The database backup needs the root account or an account with full database access. That way all database information is saved before you migrate Joomla to Google Cloud. To back up all databases on the server, run the database dump command on the old server.

    The dump creates a file named all_databases_backup.sql, a complete copy of all your website's data. Keep this file in your current working directory so it is easy to reach during the transfer.

    You should now have two files: current-server-backup.tar and all_database_backup.sql. Check that both exist and are not empty before you continue.

    Copy the current server's content to the Google Cloud server

    The next step is to copy the tar archive and the SQL file to the new Google Cloud server. You have several ways to do it. Pick one of the three below.

    Option 1: rsync. You can use the rsync command from the new server, connecting over SSH, with a command similar to the one you would use for any remote copy. Change the host names as needed. rsync is a good choice for large sites because it can resume after an interruption.

    Option 2: scp. Secure Copy Protocol (SCP) copies files over SSH and encrypts the data in transit. While you are connected to the Google Cloud server in the console, run the commands below to connect to your current server and pull the backed-up content. Replace the user name, host name and paths with your own. The second form copies a whole folder recursively with the -r option, which is useful if you want the live files instead of the archive.

    💻Code
    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/
    💻Code
    scp -r username@current_server_ip:/path/to/joomla/files /path/to/destination/on/new/server

    Option 3: wget. If you can't get the files over SSH, use wget to download them to your new Google Cloud server. For this to work, you must first put the files in the web root of the current server so they are reachable over HTTP. Then run the commands below on the new server.

    ⬛Command Prompt
    cd ~
    wget http://old-web-site.com/all_database_backup.sql
    wget http://old-web-site.com/current-server-backup.tar
    💻Code
    wget http://current_server_ip/path/to/joomla/files/current-server-backup.tar

    Delete the backup files from the old server's web root as soon as the download finishes. A database dump that anyone can download by URL is a serious security risk.

    Once the files are on your new server, continue below. You will extract them and import the database content into your database server.

    Restore the current server's content to the Google Cloud server

    Restoring means two things. You unpack your website files into the correct web root directory, and you import the SQL file into MySQL or MariaDB. When both are done, your Joomla site is in place on the new virtual machine.

    The commands below extract the archive and copy the files into the web root. The tar command unpacks into your current folder, so the files land in a var/www/html folder there. Adjust the paths so the files end up in the web root of the new server. Use the file names you actually created. In your case the archive is the tar file you copied over.

    🐧Bash / Shell
    tar -xvf current-server-content.tar
    sudo cp -rf /var/www/html/ /var/www/html/
    💻Code
    tar -xvf current-server-backup.tar
    mysql -u root -p database_name < all_database_backup.sql

    Next, import the database content into your database server using the mysql command in the block above. If you import into a named database, create that empty database and a user with access to it first, using the MySQL or MariaDB console. The command asks for the password. When it returns to the prompt with no error, the import is done.

    If the database name, user or password on the new server differ from the old ones, update them in Joomla's configuration.php file. Joomla reads its database connection settings from there. A wrong value gives you a database connection error on the first page load.

    Run the permission commands after you copy the server and database data to the Google Cloud server. They set the correct owner and permissions on the website files and folders. This makes the new server's settings match the original and prevents access problems. The chmod line is a quick, broad setting. Many Joomla admins prefer 755 for folders and 644 for files, so tighten it if your host policy requires.

    Before you restart the web server, confirm that all website settings on the old server match the new Google Cloud server. Then restart the web server. Run only the restart command for the web server you installed. If Apache is not installed, the Apache restart command returns an error, and the same goes for Nginx.

    🐧Bash / Shell
    sudo systemctl restart nginx
    sudo systemctl restart apache2
    🐧Bash / Shell
    sudo chown -R www-data:www-data /var/www/html
    sudo chmod -R 755 /var/www/html

    Run the chown and chmod commands first, then restart the web server. If you get an error, resolve it before you move on. The web server's error log is the first place to look.

    Update your DNS and point your domain to your new Google server IP address

    The last step is to update DNS. Log in to your domain registrar or DNS provider and change the A record to the IP address of your Google Cloud server. Visitors then reach your newly migrated Joomla site instead of the old host.

    Before you switch, make sure the new server's external IP is static. By default, a VM's external IP address can change when you stop and start the instance. In the Google Cloud Console, reserve it under VPC network IP addresses. Also check that your instance allows HTTP and HTTPS traffic through the firewall, or visitors will not reach the site.

    Test the site first. 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. To make the switch quicker, lower the record's TTL a day ahead of time. DNS changes can take anywhere from minutes to a few hours to reach everyone. Keep the old server online until the new one answers correctly everywhere.

    If everything works, you can continue fine-tuning your new server to ensure everything is configured correctly.

    The version checks below belong to the inventory step at the start of this guide. Run them on your current server and note the results.

    If you're using Apache, here's how to check its version on Ubuntu. Run the command shown below, then read the version number from what it prints.

    💻Code
    apache2 -v
    🐧Bash / Shell
    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. Run the command below and note the version in the output.

    💻Code
    nginx -v
    💻Code
    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 to install a specific version on Ubuntu Linux, read the post below. Note the PHP modules too, not just the version number:

    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 runs on Ubuntu Linux. Note the version and which of the two you use. The database version affects how the SQL dump imports on the new server.

    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 and connecting to your Google Cloud server starts with creating a Compute Engine instance. Then you connect over SSH (Secure Shell, a secure text-based command interface) straight from the Google Cloud Console. That gives you a secure command-line connection to build your new hosting environment.

    Compute Engine instances act as virtual computers for your site. You do not need a separate SSH program to reach one. The Google Cloud Console provides direct browser access via SSH 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
    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
    connect to google cloud instance host
  • Install LAMP or LEMP on the new server before migration

    Installing a LAMP or LEMP stack on your new server before a Joomla migration to Google Cloud requires setting up Linux, a web server like Apache or Nginx, a database like MySQL or MariaDB, and PHP. Matching your exact previous software stack ensures your Joomla files and database run correctly without compatibility errors.

    Matching your original server packages prevents compatibility errors on the new host. Helpful posts exist for installing Apache, Nginx, MySQL, MariaDB, or PHP.

    You may want to use some other posts when installing LAMP or LEMP 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

    Configuring your new Google server to match your current server means copying over exact web server folder structures, Apache Virtual Host or Nginx Server block rules, and PHP configuration settings. Matching these server parameters ensures your Joomla site functions identically in the new environment.

    📝Good to KnowEnsure the web server (Apache or Nginx) settings are on old and new servers, including the same directory structure and Virtual Host or Server block content.
    • 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

    Backing up current server data and your database before a Joomla migration to Google Cloud involves downloading all website files and exporting a complete SQL database dump. This backup serves as a safety net so you can restore your Joomla site if any part of the cloud transfer fails.

    First, you need the Joomla website content and database content. Back up the website content as well as the content in the database.

    ⚠️WarningStopping 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.

    💻Code
    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/
    💻Code
    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.

    ⬛Command Prompt
    cd ~
    wget http://old-web-site.com/all_database_backup.sql
    wget http://old-web-site.com/current-server-backup.tar
    💻Code
    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

    Restoring the current server's content to the Google Cloud server requires uploading your backed-up website files to the correct web root directory and importing your database SQL file into MySQL. This file transfer and database import makes your Joomla site live on your new virtual machine.

    🐧Bash / Shell
    tar -xvf current-server-backup.tar
    sudo cp -rf /var/www/html/ /var/www/html/
    💻Code
    tar -xvf current-server-backup.tar
    mysql -u root -p database_name < all_database_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.

    🐧Bash / Shell
    sudo systemctl restart nginx
    sudo systemctl restart apache2
    🐧Bash / Shell
    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

    Updating your DNS and pointing your domain to your new Google server IP address requires logging into your domain registrar and changing the A record to match your Google Cloud static IP. This directs visitor traffic from your old host to your newly migrated Joomla 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.

    ```

    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. The order matters: inventory the old server, build a matching new server, back up, copy, restore, test, and only then change DNS. You can share feedback or report errors using the comment form below the guide.

    Was this guide helpful?

    Was this helpful?
    Richard

    About the Author

    Richard

    Tech Writer, IT Professional

    Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

    Advertisement

    📚 Related Tutorials

    How to Create Your Website on Google Cloud Server
    Ubuntu Linux How to Create Your Website on Google Cloud Server
    How to Fix Microsoft Edge Not Opening on Windows 11
    Browsers How to Fix Microsoft Edge Not Opening on Windows 11
    Enable or Disable Spellcheck Assistance in Microsoft Edge
    Browsers Enable or Disable Spellcheck Assistance in Microsoft Edge
    How to Install Nginx on Ubuntu Linux
    Ubuntu Linux How to Install Nginx on Ubuntu Linux

    No comments yet — be the first to share your thoughts!

    Leave a Comment

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