Skip to content

How to Migrate a WordPress Website from Google Cloud Platform (GCP) to Neurax Host

Overview

This guide explains how to manually migrate a WordPress website from Google Cloud Platform (GCP) to Neurax Host.

The process involves exporting WordPress website files and the database from a Google Compute Engine virtual machine (VM), then restoring them on Neurax Host using cPanel.

This guide applies to WordPress installations running on a Google Compute Engine VM, including suitable Google Cloud Marketplace deployments. The exact steps may differ depending on the VM image, operating system, WordPress directory, and database configuration.

If your WordPress website uses Google Cloud SQL instead of a database installed on the VM, the database export process may require different connection settings, permissions, or Google Cloud tools.

Need help with migration? Neurax Host advertises free website migration assistance. Contact the support team to confirm eligibility and request help if you are unfamiliar with SSH commands or database transfers.

Website: https://www.neuraxhost.ca/

Prerequisites

Before starting, ensure you have:

  • An active Google Cloud Platform account.
  • Access to the Compute Engine VM hosting WordPress.
  • SSH access and the required VM permissions.
  • An active Neurax Host account with cPanel access.
  • Access to your website domain and DNS management settings.
  • A computer with sufficient storage space for website and database backups.
  • Google Cloud CLI installed, authenticated, and configured on your local computer if using gcloud compute scp.
  • The VM name, project ID, and zone.
  • Access to the WordPress database or Cloud SQL instance.
  • Enough available disk space on the VM to create backup archives.

Important: Keep your Google Cloud VM running until the migrated website has been tested successfully on Neurax Host.

If your website receives orders, bookings, comments, or customer enquiries, plan a final database synchronization or maintenance window before switching DNS.


Phase 1: Export Website from Google Cloud Platform

Step 1: Connect to the Compute Engine Instance

Purpose: Access the VM hosting your WordPress website.

Instructions:

  1. Log in to the Google Cloud Console.
  2. Navigate to Compute Engine → VM instances.
  3. Locate the VM hosting your WordPress website.
  4. Verify the VM name and zone.
  5. Click SSH to open a terminal session.
  6. Confirm that you can access the server.

Expected Outcome: You are connected to the Compute Engine VM.

Note: SSH access depends on your Google Cloud permissions, VM configuration, and security settings.

Step 2: Locate the WordPress Installation

Purpose: Find the actual directory containing your WordPress files.

Common WordPress locations may include:

  • /var/www/html
  • /var/www/wordpress

Other installations, including some Google Cloud Marketplace images, may use different paths.

Instructions:

  1. Connect to the VM through SSH.
  2. Identify the web server configuration or application installation directory.
  3. Navigate to the suspected WordPress directory.
  4. Check for the following files and folders:
    • wp-admin
    • wp-content
    • wp-includes
    • wp-config.php
    • index.php
  5. Confirm that the directory belongs to the website you want to migrate.

For example, if WordPress is installed in /var/www/html, run:

cd /var/www/html
ls -la

Expected Outcome: The correct WordPress installation directory is identified.

Important: Do not assume that every GCP WordPress installation uses /var/www/html. Use the actual directory found on your VM.

Step 3: Create a Website Backup

Purpose: Create a ZIP archive containing the WordPress website files.

Instructions:

  1. Confirm that the zip utility is installed on your VM.
  2. Check that sufficient disk space is available.
  3. Identify the actual WordPress installation directory.
  4. Create a secure backup directory outside the public website root.
  5. Compress the WordPress files into that directory.

Example commands:

The following example assumes WordPress is installed in /var/www/html. Replace that path if your installation is elsewhere.

# Check available disk space
df -h

# Check whether zip is installed
command -v zip

# Create a private backup directory
mkdir -p "$HOME/wordpress-migration"

# Restrict access to the backup directory
chmod 700 "$HOME/wordpress-migration"

# Open the actual WordPress directory
cd /var/www/html

# Create the backup outside the web root
zip -r "$HOME/wordpress-migration/backup.zip" .

If zip is unavailable, install it using the appropriate package manager and required permissions, or use another supported archive tool.

Expected Outcome: A ZIP archive is created in the private backup directory.

Example:

~/wordpress-migration/backup.zip

Important: Do not store sensitive backup archives inside the public WordPress directory. ZIP files may contain configuration information, credentials, and other private website data.

The zip -r command includes hidden files within the selected directory, including .htaccess when present.

Step 4: Download Website Files

Purpose: Transfer the website backup archive from Google Cloud to your local computer.

Instructions:

  1. Install and configure Google Cloud CLI on your local computer.
  2. Authenticate with the Google Cloud account that has access to the VM.
  3. Identify the correct VM name, zone, and project ID.
  4. Open a terminal on your local computer.
  5. Run the file transfer command.

Example command:

gcloud compute scp \
  VM_NAME:~/wordpress-migration/backup.zip \
  . \
  --zone=VM_ZONE \
  --project=PROJECT_ID

Replace:

  • VM_NAME with the actual Compute Engine VM name.
  • VM_ZONE with the VM's zone.
  • PROJECT_ID with the correct Google Cloud project ID.

The dot (.) means the file will be downloaded to your current local directory.

Expected Outcome: The website backup archive downloads successfully.

Important: This command runs on your local computer, not inside the VM's SSH terminal. The exact transfer method may vary depending on the VM's SSH configuration, permissions, and network access.

Step 5: Export the WordPress Database

Purpose: Create a database backup containing WordPress content, users, and settings.

Instructions:

  1. Connect to your Google Compute Engine VM through SSH.
  2. Open the actual WordPress installation directory.
  3. Locate wp-config.php.
  4. Identify the database connection settings.

Look for values such as:

define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_user');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'your_database_host');
  1. Confirm whether the database is installed locally on the VM or hosted separately through Cloud SQL.
  2. If the database is accessible using a compatible MySQL or MariaDB client, export it with the appropriate credentials.

Example command for a locally accessible database:

mysqldump -u YOUR_DB_USER -p YOUR_DB_NAME \
  > "$HOME/wordpress-migration/database.sql"

Replace YOUR_DB_USER and YOUR_DB_NAME with the actual values from wp-config.php.

The command prompts you for the database password.

If the database requires a specific hostname, the command may need the -h option:

mysqldump -h YOUR_DB_HOST -u YOUR_DB_USER -p YOUR_DB_NAME \
  > "$HOME/wordpress-migration/database.sql"

Important: These commands assume the database server is MySQL or MariaDB-compatible and that the required client tools and permissions are available.

If WordPress uses Google Cloud SQL, verify the database connection method, network access, permissions, and supported export options. A Cloud SQL export may require a different workflow.

Expected Outcome: A SQL database backup is created outside the public website directory.

Example:

~/wordpress-migration/database.sql

Step 6: Download the Database Backup

Purpose: Save the exported database to your local computer.

Instructions:

  1. Confirm that the SQL backup exists in the private backup directory on the VM.
  2. Open a terminal on your local computer.
  3. Run the Google Cloud file transfer command.

Example command:

gcloud compute scp \
  VM_NAME:~/wordpress-migration/database.sql \
  . \
  --zone=VM_ZONE \
  --project=PROJECT_ID

Replace the VM name, zone, and project ID with your actual values.

Expected Outcome: The database backup downloads successfully.

Important: Use the same actual SQL file location in the export and download steps. Do not assume that the database file was created inside /var/www/html.

Step 7: Verify Downloaded Files

Purpose: Confirm that the required migration files are available.

Instructions:

  1. Open the folder where the backup files were downloaded.
  2. Verify that the website ZIP archive exists.
  3. Confirm that the SQL database backup is present.
  4. Check that both files downloaded completely.
  5. Store the files securely.

Example files:

  • backup.zip
  • database.sql

Expected Outcome: Both migration files are available locally.

Security reminder: These backups may contain database credentials, customer information, and other sensitive data. Do not upload them to public storage or share them through unsecured links.


Phase 2: Import Website into Neurax Host

Step 8: Log in to Neurax cPanel

Purpose: Access the destination hosting account.

Instructions:

  1. Log in to your Neurax Host account.
  2. Open the hosting service associated with your domain.
  3. Launch cPanel.

Expected Outcome: The Neurax cPanel dashboard opens successfully.

Step 9: Upload Website Files

Purpose: Transfer the WordPress website files to Neurax Host.

Instructions:

  1. Open File Manager in Neurax cPanel.
  2. Navigate to the document root assigned to your domain.
  3. Verify the correct document root in the Domains section if necessary.
  4. Click Upload.
  5. Select the website ZIP archive downloaded from Google Cloud.
  6. Wait until the upload completes.
  7. Confirm that the archive appears in File Manager.

Expected Outcome: The website backup archive is uploaded successfully.

Important: The document root is not always public_html. Use the actual path assigned to your domain.

Because the archive may contain sensitive files, keep it outside the public web root where practical and extract it into the verified document root. If you must temporarily upload it to a publicly accessible directory, remove it immediately after successful extraction.

For large websites, SFTP or another supported transfer method may be more suitable.

Step 10: Extract Website Files

Purpose: Restore the WordPress files on Neurax Host.

Instructions:

  1. Select the uploaded ZIP archive.
  2. Click Extract.
  3. Extract the files into the actual document root assigned to your domain.
  4. Wait until extraction finishes.
  5. Verify that the WordPress files are located directly inside the intended directory.

Check for:

  • wp-admin
  • wp-content
  • wp-includes
  • wp-config.php
  • index.php

Also verify hidden files such as .htaccess if they were present in the original installation.

Expected Outcome: The WordPress files are restored to the correct directory.

Important: Avoid unnecessary nested directories.

For example, if the document root is public_html:

Incorrect:

public_html/wordpress/wp-admin

Correct:

public_html/wp-admin

Note: A GCP WordPress installation may use server-specific configuration files or settings that do not apply to cPanel hosting. Review the restored website configuration before making the site live.

Step 11: Create a Database

Purpose: Create a new database for WordPress on Neurax Host.

Instructions:

  1. Return to Neurax cPanel.
  2. Open MySQL Databases, Manage My Databases, or the equivalent database management option.
  3. Locate Create New Database.
  4. Enter a database name.
  5. Click Create Database.
  6. Record the complete database name.

Expected Outcome: A new database is created.

Important: cPanel may add an account-specific prefix to the database name.

Step 12: Create a Database User

Purpose: Create a user account that WordPress will use to access the database.

Instructions:

  1. Open the database management section.
  2. Locate Add New User.
  3. Enter a database username.
  4. Generate a strong password.
  5. Click Create User.
  6. Save the username and password securely.

Expected Outcome: A database user is created successfully.

Step 13: Assign User to Database

Purpose: Give the database user the required access permissions.

Instructions:

  1. Locate Add User to Database.
  2. Select the newly created user.
  3. Select the new database.
  4. Click Add.
  5. Grant ALL PRIVILEGES.
  6. Click Make Changes.

Expected Outcome: The database user has the required permissions to access the WordPress database.

Step 14: Import the Database

Purpose: Restore WordPress content and settings on Neurax Host.

Instructions:

  1. Open phpMyAdmin in Neurax cPanel.
  2. Select the newly created database.
  3. Click Import.
  4. Click Choose File.
  5. Select the SQL backup downloaded from Google Cloud.
  6. Click Go.
  7. Wait for the import to finish.
  8. Confirm that the WordPress database tables appear.

Expected Outcome: The WordPress database imports successfully.

Important: Large SQL files may exceed phpMyAdmin upload or execution limits. If the import fails because of file size, review the hosting limits and contact Neurax Host support for an appropriate alternative import method.

Step 15: Update WordPress Configuration

Purpose: Connect WordPress to the new database on Neurax Host.

Instructions:

  1. Open File Manager.
  2. Navigate to the verified WordPress document root.
  3. Locate wp-config.php.
  4. Click Edit.
  5. Find the database connection settings.
  6. Replace the old database values with the new Neurax database credentials.

Example configuration:

define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_user');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'your_database_host');

Replace the example values with the actual details for your Neurax hosting account.

Important: Do not assume that DB_HOST must be localhost. Use the database hostname specified for your Neurax hosting environment.

Also verify the WordPress table prefix.

For example:

$table_prefix = 'wp_';

The prefix must match the actual database tables imported from Google Cloud. Some websites use a different prefix.

  1. Save wp-config.php.
  2. Confirm that the database credentials are correct.

Expected Outcome: WordPress is configured to connect to the new database.

Additional check: If your GCP installation used environment variables, external configuration files, or custom database connection settings, review those dependencies and adapt the configuration for Neurax Host.

Step 16: Test the Website and Update DNS

Purpose: Verify the migrated website before directing public traffic to Neurax Host.

Instructions:

  1. Confirm that the WordPress files are in the correct document root.
  2. Verify that the database import completed successfully.
  3. Check the database connection settings.
  4. Test the migrated website using a supported preview method or a local hosts-file override, if appropriate.
  5. Check the homepage, internal pages, images, and important website functions.
  6. Review the existing DNS records.
  7. Confirm that email-related DNS records will remain correct.
  8. Update DNS only after the destination website is ready.

Depending on your DNS setup, you may need to:

  • Update the relevant A record to the Neurax Host server IP address.
  • Change the domain nameservers to the nameservers provided by Neurax Host.

Important: These are different DNS management approaches.

Changing nameservers transfers DNS authority to another provider and may affect existing DNS records, including email-related records. If you change nameservers, recreate and verify the necessary DNS records at the new DNS provider.

If you keep your current DNS provider, you may only need to update the appropriate website records.

Always use the correct server IP address or nameservers supplied for your Neurax hosting account.

Expected Outcome: The domain begins resolving to the Neurax hosting environment as DNS caches update.

Important: DNS propagation time varies depending on caching, TTL settings, and DNS providers. No fixed completion time is guaranteed.

Keep your Google Cloud VM active until the migration is fully verified.

Step 17: Enable SSL

Purpose: Secure the migrated WordPress website using HTTPS.

Instructions:

  1. Open SSL/TLS Status or the available SSL management section in Neurax cPanel.
  2. Check whether a valid SSL certificate is installed.
  3. Run AutoSSL if available and required.
  4. Wait for the certificate to be issued successfully.
  5. Open the website using HTTPS.
  6. Verify that the browser accepts the certificate.
  7. Confirm that the website loads securely.
  8. Enable Force HTTPS Redirect only after HTTPS works correctly.

Expected Outcome: The website loads securely over HTTPS.

Important: Do not enable Force HTTPS Redirect before the SSL certificate is active and HTTPS has been tested successfully.

Step 18: Test the Website

Purpose: Confirm that the WordPress website functions correctly on Neurax Host.

Instructions:

  1. Open your website in a browser.

    https://yourdomain.com

  2. Verify that the homepage loads correctly.

  3. Check important internal pages.

  4. Confirm that images display properly.

  5. Test navigation menus.

  6. Submit a test contact form.

  7. Verify that form notifications are delivered.

  8. Open the WordPress admin login page.

    https://yourdomain.com/wp-admin

  9. Log in using your existing WordPress credentials.

  10. Confirm that the WordPress dashboard opens.

  11. Navigate to Settings → Permalinks.

  12. Click Save Changes without modifying the permalink structure.

  13. Test internal pages again.

  14. Verify that plugins and themes work correctly.

  15. Confirm that there are no database connection errors.

  16. Check HTTPS and website redirects.

Expected Outcome: The WordPress website and admin dashboard function correctly on Neurax Host.

Important: Confirm that you are testing the website served from Neurax Host rather than a cached copy or the original Google Cloud VM.


Additional Migration Considerations

1. Google Cloud SQL Database Configuration

Purpose: Identify database setups that may require a different export method.

Some WordPress websites on Google Cloud use a database installed directly on the Compute Engine VM. Others use a separate Cloud SQL instance.

If your website uses Cloud SQL:

  1. Identify the Cloud SQL instance associated with WordPress.
  2. Check the database engine and version.
  3. Verify the database connection method.
  4. Confirm that you have the required export permissions.
  5. Use a supported database export method.
  6. Download the exported database securely.
  7. Confirm that the exported SQL file is compatible with the destination database environment.

Important: Do not assume that a local mysqldump command will work for every Cloud SQL configuration.

2. WordPress Domain URL Changes

Purpose: Ensure WordPress uses the correct website address after migration.

If you are keeping the same domain name, a full URL replacement is usually unnecessary.

If the domain is changing, you may need to update WordPress URLs and internal links.

Recommended steps:

  1. Create a database backup.
  2. Log in to WordPress Admin.
  3. Navigate to Settings → General.
  4. Review WordPress Address (URL) and Site Address (URL).
  5. Update the values if the domain is changing.
  6. Use a WordPress-compatible search-and-replace tool for internal URLs where required.
  7. Clear website caches.
  8. Test pages, images, menus, and redirects.

Important: WordPress can store URLs in serialized database data. Avoid simple database-wide text replacement because it can damage serialized values.

Use a tool that safely handles WordPress serialized data.

3. DNS and Downtime Planning

Purpose: Reduce downtime and avoid losing recent website changes.

Before updating DNS:

  1. Complete the website file transfer.
  2. Import the database.
  3. Verify the database connection.
  4. Test the destination website.
  5. Review existing DNS records.
  6. Check email-related DNS records.
  7. Confirm that the destination website is ready.

If your website receives orders, bookings, comments, or customer submissions, arrange a final database synchronization or maintenance window before DNS cutover.

Changes made to the original website after the database export will not automatically appear on Neurax Host.

Important: Keep the Google Cloud VM active until the new hosting environment is fully operational.

4. Secure Backup Cleanup

Purpose: Reduce the risk of exposing sensitive migration files.

After confirming that the migration is successful:

  1. Create a fresh backup on Neurax Host.
  2. Verify that the backup is complete.
  3. Store a secure backup copy in a protected location.
  4. Delete temporary ZIP and SQL files from publicly accessible hosting directories.
  5. Remove temporary migration files from the Google Cloud VM when they are no longer needed.
  6. Keep any required long-term backups in secure storage.

Important: Backup archives and SQL files may contain sensitive website information. Do not leave them inside a public document root.


Post-Migration Checklist

Before completing the migration, verify the following:

  • Correct WordPress installation directory was identified on GCP.
  • Website backup was created outside the public web root.
  • ZIP archive contains the required WordPress files.
  • Hidden files were included where applicable.
  • Database export completed successfully.
  • Website ZIP and SQL backups downloaded correctly.
  • Correct document root was selected on Neurax Host.
  • WordPress files extracted without unnecessary nested folders.
  • Database imported successfully.
  • Database credentials and hostname are correct.
  • WordPress table prefix matches the imported database.
  • Website homepage loads from Neurax Host.
  • WordPress admin login works.
  • Images and styling display correctly.
  • Contact forms work.
  • Plugins and themes function correctly.
  • Permalinks have been saved and tested.
  • SSL certificate is active.
  • HTTPS redirects work correctly.
  • DNS records point to the intended services.
  • Email-related DNS records are preserved.
  • WordPress URLs are correct.
  • A fresh backup has been created on Neurax Host.
  • Temporary migration files have been securely removed.
  • Google Cloud VM remains active until final verification.

Frequently Asked Questions (FAQs)

Q1. Can I migrate WordPress from Google Cloud Marketplace?

Answer: Yes. A WordPress installation deployed through Google Cloud Marketplace can generally be migrated to Neurax Host. However, file locations, permissions, and database configurations may vary depending on the Marketplace image.

Q2. Will migration affect my existing Google Cloud website?

Answer: A properly planned migration generally copies website files and database information without deleting the original website. However, backup operations, database activity, configuration changes, or DNS updates can affect the live service. Keep a verified backup and avoid unnecessary changes to the production environment.

Q3. Do I need SSH access to migrate WordPress from GCP?

Answer: SSH access is required for the command-line workflow described in this guide. Other migration methods may be available depending on your WordPress setup, permissions, and hosting tools.

Q4. Can I use the same WordPress domain after migration?

Answer: Yes. You can continue using the same domain. Once the website is ready on Neurax Host, update the necessary DNS records to direct visitors to the new hosting environment.

Q5. How long does DNS propagation take?

Answer: DNS changes can take different amounts of time to appear across networks. Timing depends on DNS caching, TTL settings, and the providers involved. There is no guaranteed completion time.

Q6. Can I migrate a WordPress website using Cloud SQL?

Answer: Yes, provided the database can be exported and imported into a compatible destination environment. The export method may differ from a database installed directly on the Compute Engine VM.

Q7. Should I delete my Google Cloud VM immediately after migration?

Answer: No. Keep the original VM available until the website, database, DNS, email-related services, and important website functions have been verified on Neurax Host.

Q8. Does Neurax Host offer website migration assistance?

Answer: Neurax Host advertises free website migration assistance. Contact support to confirm eligibility, requirements, and whether your Google Cloud setup can be handled through the available migration service.


Troubleshooting Guide

1. Error Establishing a Database Connection

Possible Causes:

  • Incorrect database name.
  • Incorrect database username or password.
  • Incorrect database hostname.
  • Missing database privileges.
  • Database server connectivity problems.

Solutions:

  1. Open wp-config.php.
  2. Verify the database credentials.
  3. Confirm the correct database hostname.
  4. Check database user privileges.
  5. Verify that the imported WordPress tables exist.
  6. Save the configuration and test again.

2. Website Loads Without Images

Possible Causes:

  • Missing uploaded files.
  • Incorrect file paths.
  • Incorrect website URLs.
  • Cached assets.
  • Mixed-content errors.

Solutions:

  1. Confirm that wp-content/uploads was transferred.
  2. Check image URLs.
  3. Clear website and browser caches.
  4. Verify the website's HTTPS configuration.
  5. Re-upload missing files if required.

3. 404 Errors After Migration

Possible Causes:

  • Permalink rules need refreshing.
  • Missing .htaccess configuration.
  • Server rewrite settings differ from the original environment.

Solutions:

  1. Log in to WordPress Admin.
  2. Navigate to Settings → Permalinks.
  3. Click Save Changes.
  4. Test the affected pages.
  5. Review .htaccess and rewrite settings if the issue continues.

4. DNS Changes Are Not Working

Possible Causes:

  • Incorrect A record.
  • Incorrect nameservers.
  • Cached DNS information.
  • DNS records updated at the wrong provider.

Solutions:

  1. Verify the authoritative DNS provider.
  2. Check the current nameservers.
  3. Confirm the correct Neurax Host IP address.
  4. Review A and AAAA records where applicable.
  5. Check DNS resolution using a lookup tool.
  6. Allow time for cached DNS information to refresh.

Important: DNS propagation time varies. Do not rely on a fixed 48-hour deadline.

5. Google Cloud File Transfer Fails

Possible Causes:

  • Incorrect VM name.
  • Incorrect VM zone.
  • Missing Google Cloud CLI authentication.
  • Insufficient permissions.
  • SSH connectivity restrictions.
  • Incorrect backup file path.

Solutions:

  1. Verify the VM name, zone, and project ID.
  2. Confirm Google Cloud CLI is installed and authenticated.
  3. Check that you have the required permissions.
  4. Verify that the backup file exists.
  5. Review SSH connectivity and access settings.
  6. Retry the transfer using the correct command.

6. SSL Certificate Is Not Working

Possible Causes:

  • Domain does not resolve to the intended server.
  • SSL certificate has not been issued.
  • Certificate validation failed.
  • HTTPS redirect was enabled too early.

Solutions:

  1. Verify DNS configuration.
  2. Check the SSL certificate status in cPanel.
  3. Run AutoSSL if available.
  4. Confirm that HTTPS loads successfully.
  5. Enable Force HTTPS Redirect only after the certificate is valid.

Migration Complete

Your WordPress website can be considered successfully migrated from Google Cloud Platform to Neurax Host once the website files, database, domain configuration, and important website functions have been verified.

Before shutting down your Google Cloud VM, confirm that:

  • The website loads correctly from Neurax Host.
  • WordPress Admin works.
  • Images, forms, plugins, and internal pages function properly.
  • The database connection is stable.
  • HTTPS is enabled.
  • DNS and email-related records are correct.
  • A secure backup is available.
  • Temporary migration files have been removed from public directories.

If you need help with the migration, contact Neurax Host to confirm the availability of its advertised free website migration service.

Learn more: https://www.neuraxhost.ca/

Need more help?

Our AI is available 24/7, or get in touch with a human.