NEED HELP. Wordpress instance not working after creating an image

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: 3a498d3a-5213-769e-95ef-6ec8da0632f3
Description:
I tried cloning my ec2 that was running bitnami wordpress AMI. After the image was created, my website which was hosted on the original ec2 is not accepting web connections at all.

My website is down after I created an image of the instance and I am not able to figure whats wrong.

Could someone please help with this.

Hello @raj02081992

I see lots of errors regarding Pagespeed. Pagespeed can cause this issue sometimes. Can you try flushing the cache?

https://docs.bitnami.com/general/infrastructure/lamp/administration/use-pagespeed/#flush-the-pagespeed-cache

If that doesn’t work, can you try disabling it entirely?

https://docs.bitnami.com/general/infrastructure/lamp/administration/use-pagespeed/#disable-pagespeed

Apart from that, I can see you are almost running out of memory:

-----------------------------------
Display amount of free and used memory in the system
-----------------------------------
Running: free -m
In: /opt/bitnami

Output:

              total        used        free      shared  buff/cache   available
Mem:            987         727          64          21         195         101
Swap:           634          16         618

You could try to increase your machine type if you face performance issues. This guide explains the process
https://docs.bitnami.com/aws/faq/administration/change-server-type/

Let me share with you our troubleshooting documentation:
https://docs.bitnami.com/aws/how-to/troubleshoot-wordpress-issues/
https://docs.bitnami.com/aws/faq/troubleshooting/troubleshoot-server-performance/

We also have a guide to optimize Wordpress:
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/optimize-bitnami-wordpress/

I hope it helps

Thanks for your response David. I tried flushing pagespeed cache and also disabled it later on. The problem still persists.
My load balancer is resolving to “Awesome! Wordpress is now installed” page. the URL is http://rajblog-1542621554.ap-south-1.elb.amazonaws.com/ (screenshot below)
I feel some setup config got messed up when aws created the AMI of the instance. Before that, it was working all fine for months without any issues. Could you please help me understand what is wrong. Will really appreciate your help.

my website is https://rajvardhan.com which resolves to the load balancer mentioned above.

Hello @raj02081992,

I can see these lines in your wp-config.php file:

//define('WP_SITEURL', 'https://rajvardhan.com/');
//define('WP_HOME', 'https://rajvardhan.com/');
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

Could you change it with:

define('WP_SITEURL', 'https://rajvardhan.com/');
define('WP_HOME', 'https://rajvardhan.com/');

Regards

I have changed it now. Still getting the same issue. I have restarted using this command as well sudo /opt/bitnami/ctlscript.sh restart

Hello @raj02081992,

I can see your /opt/bitnami/apache2/conf/bitnami/bitnami.conf is empty. You should recover it from /opt/bitnami/apache2/conf/bitnami/bitnami.conf~ (temporary file) that may contain the latest desired status, or from /opt/bitnami/apache2/conf/bitnami/bitnami.conf.back.202102021155. In this second case, you would need to change the following lines:

SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"

to

SSLCertificateFile "/opt/bitnami/apache2/conf/rajvardhan.com.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/rajvardhan.com.key"

and restart apache

Regards

This totally worked. You are a lifesaver David. really appreciate taking out time for this.

1 Like