My website is fine while accessing it via wordpress default address address but broken if i access it via the domain

Keywords: WordPress - Google Cloud Platform - Technical issue - Other
Description:
My website is fine while accessing it via the wordpress default address http://35.233.228.229/ but broken while trying to access it via the domain address https://djmalaysia.com/. How can i fix this issue?

Would apprecite an assistance on this. Thank you.

Hi @princeokpara,

Thanks for using Bitnami. Can you try to configure the WordPress domain as mentioned in this guide? Note you can set it with https:// if you are using an SSL certificate

https://docs.bitnami.com/google/apps/wordpress/administration/configure-domain/

Apart from that, we have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Thanks for the guide. Here is the code that was generated after running the bitnami support tool b5344218-2ff7-a4bf-a7ca-756023299166

On trying to to configure the WordPress domain as mentioned in the guide you shared i was denied permission at the stage of configuring the WordPress wp-config.php

Or will i need to use the Bitnami WordPress Multisite Stack instead. Since i have another site i am hosting on GCP on a different vm instance?

Hi @princeokpara,

Thanks for the bnsupport code. I see you updated the wp-config.php file properly. I visited your website and I think I know what’s the issue you are facing. There are some URLs with HTTP links instead of HTTPS. Can you check in the theme configuration or the media library if you can update them?

Additionally, can you check the database values with the command below? It will prompt you for the database password in wp-config.php

sudo mysql -u bn_wordpress -p -e "USE bitnami_wordpress; SELECT option_name,option_value FROM wp_options WHERE option_name='siteurl' OR option_name='home';"

No i cant please can you give me a guide or step on how to check in the theme configuration or the media library if i can update them?

And once i run the set command to prompt database password in wp-config.php would that resolve my issues?

Hi @princeokpara,

You need to SSH connect to your server and run the command I shared to get the database information. It will prompt you for the database password stored in the wp-config.php file

Thank you Gongomgra for your support. Please i ran the command you shared to get the database information and I’m asked to enter password, on entering password on the SSH terminal the whole system just stops responding.

Hi @princeokpara,

You need to copy the password from the wp-config.php file and paste it in the terminal when prompted.

I’m asked to enter password, on entering password on the SSH terminal the whole system just stops responding.

Can you give us more information on this? Typing the password won’t show any character in the terminal, because you are typing a secret. You only need to paste the password and click the “Enter” key.

On typing the command it says the should enter password. On pasting the password of my wordpress and pressing enter,the terminal do not respond.

Then after waiting and trying again to paste the password on the terminal it showed “the command is not found” in which i entered. Please how can i resolve this asap?

Hi @princeokpara,

You should type the database password in the wp-config.php file which is the value of the DB_PASSWORD field. Can you send us a screenshot of the error you are getting?

I ran the same command in my own instance and it is working fine. Please take a look at the screenshot below. For security reasons, I’m just showing partially the database password and the instance IP address

ok but please what command do i run to access the password in the wp config file Gongomgra?

Because all this while i have been using my wordpress password so i can go ahead and run the following command sudo mysql -u bn_wordpress -p -e “USE bitnami_wordpress; SELECT option_name,option_value FROM wp_options WHERE option_name=‘siteurl’ OR option_name=‘home’;” like you said.

Thank you.

Hi @princeokpara,

You can open the config file with the text editor of your choice, or run the next command to get the line containing the DB_PASSWORD setting

grep -i db_password /opt/bitnami/wordpress/wp-config.php

The output format will be similar to this one

define( 'DB_PASSWORD', 'RANDOM_VALUE' );

and you need to provide the mysql command with the RANDOM_VALUE string

grep -i db_password /opt/bitnami/wordpress/wp-config.php. On running the set command to get the passwordd on my wp config file i was told that wp-config.php No such file or directory so how do i access the password please?

Hi @princeokpara,

Sorry for the error, I didn’t notice you were using a previous WordPress version using a different filesystem structure. You can get the database password using the next command

grep -i db_password /opt/bitnami/apps/wordpress/htdocs/wp-config.php

grep -i db_password /opt/bitnami/apps/wordpress/htdocs/wp-config.php on running the command i was denied permission. The screenshot is attached. How do i resolve this issues please?

Hi @princeokpara,

You are not using the bitnami user. I thought you were, sorry. You can get it with the next command instead

sudo grep -i db_password /opt/bitnami/apps/wordpress/htdocs/wp-config.php

after running command sudo mysql -u bn_wordpress -p -e “USE bitnami_wordpress; SELECT option_name,option_value FROM wp_options WHERE option_name=‘siteurl’ OR option_name=‘home’;”

I am getting some error attached is screenshot

Please waiting for your reply to my above issues Bitnami?

Hi @princeokpara,

This error message usually means you provide a password but not the correct one. Did you copy only the password value without the quote marks '?