1. Home
  2. Docs
  3. GCP Marketplace
  4. GCP WordPress on Ubuntu 22.04 + LAMP + PHP 8.1

GCP WordPress on Ubuntu 22.04 + LAMP + PHP 8.1

This WordPress Image runs on Ubuntu 22.04 with LAMP 7.4.

Overview

  • Ubuntu 22.04 LTS
  • LAMP with PHP8.1
    • Apache2
    • MySQL server
    • PHP 8.1
  • WordPress 6.1.1

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:

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:

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:

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.

Step 5: Verify Root User Login

Finally, validate that you can log in with the new root user password:

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.

Disable Unattended Upgrades

Unattended Upgrades Are Turned On by default. If you want to turn unattended upgrades off please following this instruction:

  1. Run sudo dpkg-reconfigure -plow unattended-upgrades and select “No” when Configuring unattended-upgrades prompted, OR
  2. sudo apt remove unattended-upgrades to remove

Reference

  1. WordPress WP-CLI Installing guide
  2. No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
  3. NET::ERR_CERT_REVOKED Chrome MacOS home server
  4. GCP General purpose machines
  5. How to Ensure Ubuntu’s Unattended Upgrades Are Turned On
  6. How To Disable Unattended Upgrades On Ubuntu
  7. How do I stop/disable unattended upgrades from being launched automatically? [duplicate]
Tags , ,

How can we help?