To quickly deploy Joomla on Google Cloud, follow these steps:
- Sign in to your Google Cloud account and go to the Cloud Console.
- Click on "Navigation menu" (≡) and go to "Compute Engine" > "VM instances".
- Click on "Create instance" to create a new virtual machine (VM) instance.
- Provide a name for your instance and choose the desired region and zone for your deployment.
- Under "Machine configuration", configure the desired machine type, boot disk, and other settings.
- Scroll down to the "Firewall" section and select the appropriate network tags and firewall rules for your instance.
- Scroll down further to the "Management, security, disks, networking, sole tenancy" section and click on "Management, disks, networking, etc." to expand the advanced options.
- Under the "Custom metadata" section, click on "Add item" and enter "startup-script" as the key. In the value field, provide the script that installs Joomla on your instance. You can use the following script:
apt-get install -y apache2 php mysql-server php-mysql
systemctl start apache2
systemctl enable apache2
apt-get install -y unzip
mv ./administrator ./includes ./language ./libraries ./modules ./plugins ./templates ./xampp ./xmlrpc index.php /var/www/html/
chmod -R 755 /var/www/html/
- After entering the script, click on "Create" to create the instance.
- Once the instance is created, you can access it by clicking on the SSH button next to the instance name.
- In the SSH terminal, run the following command to give appropriate permissions to the Joomla installation:
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/
sudo systemctl restart apache2
- Finally, you can access your Joomla website by entering the external IP address of your instance in a web browser.
Note: Make sure to update the Joomla download link in the script with the latest stable version if needed.