This WordPress Image runs on Ubuntu 24.04 with LAMP 8.1.
Overview
- Ubuntu 24.04 LTS
- LAMP with PHP8.1
- Apache2
- MySQL server
- PHP 8.1
- WordPress 5.9.3
WordPress Installation
Once the instance is running, please access your WordPress hosting domain or enter the public DNS provided by GCP (External IP) into your browser.
https://<wordpress host or IP>/
You will see the WordPress application. Select your language settings.

Since the wp-config.php file already exists, you may see the following message. If this is the case, simply click “installing now” to continue as shown below.

Specify your account details including username and password, and click “Install WordPress” as shown below.

You should see this success message indicating that your WordPress account has been created.

Welcome to WordPress! Once you login you will land on this WordPress administration dashboard page.

MySQL password
Please follow these steps to rest the MySQL root password in the console.
Step 1: Switch to Root User
Open your terminal and execute the following command to become the root user:
$ sudo su -
Step 2: View debian-sys-maint User and Password
Execute this command to display the Debian System Maintenance (debian-sys-maint) user and its password:
# cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = **************
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = **************
socket = /var/run/mysqld/mysqld.sock
Note down the debian-sys-maint user’s password for use in the next step.
Step 3: Connect to the Local MySQL Server
Use the debian-sys-maint credentials to connect to your MySQL server:
# mysql -u debian-sys-maint -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.32-0ubuntu0.22.04.2 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Note down the debian-sys-maint user’s password for use in the next step.
Step 4: Reset Root User Password
Inside the MySQL interface, execute the following command to reset the root user password. Replace 'yourpassword' with your desired password.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';
mysql> exit
Step 5: Verify Root User Login
Finally, validate that you can log in with the new root user password:
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.32-0ubuntu0.22.04.2 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
You can find the password from VM instances console Log.
- Go to the GCP VM instances console at https://console.cloud.google.com/compute/instances
- Chose your Instance and click on the three dots → View logs

- It will open Logs Explorer up a new browser
- Run an empty query
- You will see a log entry like the following:
LAMP VM setup complete, your MySQL root password is 'xxxxxxxxxxxxxxxxxxxxx', change it ASAP!

Troubleshooting
If you encounter the following page indicating that the connection is not private, there’s a workaround.

Select anywhere on the error page, and type the following code.
thisisunsafe
This will bring you to the WordPress launch page.