You may have edited some config files for Apache, PHP-FPM, phpMyAdmin or MySQL, and now it’s time to restart for the changes to take affect. For reference, I’m running Bitnami WordPress on Google Cloud Compute Engine.

Note: Keep in mind that it’s bad practice to shutdown and restart the entire VM. You could run into a Bitnami error screen (which you can fix by reading the bottom of the post.)

Let’s restart Bitnami services

Let’s do it the safe way by SSH’ing into your GCP VM. We will need to run commands to restart the Bitnami services. Do one at a time or just the one you need to restart. Restart Apache the Bitnami way

sudo /opt/bitnami/ restart apache

Restart MySQL the Bitnami way

sudo /opt/bitnami/ restart mysql

Restart PHP-FPM the Bitnami way

sudo /opt/bitnami/ restart php-fpm

Fix Bitnami white screen after restarting VM server

The other Apache 2 service can automatically start if you restart a Google VM (virtual machine). This throws an error and can cause your Bitnami WordPress (or other apps) to white screen. We will fix the Bitnami white screen error by simply forcing the other Apache service to stop. Let’s use the below command.

sudo systemctl stop apache2.service

[cc lang=”bash”]sudo service apache2 stop[/cc]

sudo service apache2 stop

Only Bitnami’s Apache should be running now. Test out your site and restart Apache the bitnami way, rather than shutting down the VM on Google Compute Engine. Here are the offical Bitnami Docs