wordpress memory issue ec2 instance

I have installed WordPress on my t2.micro instance. WordPress is working fine with my existing theme, but when I install a new theme and activate it, my instance memory goes too high and ultimately my instance doesn’t respond any more and the site goes down and I get

bash: fork: Cannot allocate memory

Read More

I have to restart instance again. I tried many themes but am getting the same issue again and again.

I have set php memory Limit 128M in php.ini and define('WP_MEMORY_LIMIT', '64M'); in wp-config.php.

My htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I need some expert suggestion to help me out.

Related posts

Leave a Reply