How to deal with excessive memory usage WordPress?

I use WordPress 4.1 program to build my personal blog, but I found during a visit to the higher number, memory usage will rise rapidly

I used the W3 total cache caching plugin, but the effect is very small, as the opcode cache, no effect

The strange thing is once I use w3totalcache is effective, but now, no matter what opcode caching system to no avail

PHP's memory_limit to 64M

Server architecture is Mysql + Apache + Nginx

5 Replies

64M limit is enough for most wordpress installs however you may increase it to 128M to see how things go.

apache is memory eater, with incorrect settings, 1GB can be easily exhausted. you can see this article to optimize apache https://www.linode.com/docs/websites/ho … linode-1gb">https://www.linode.com/docs/websites/hosting-a-website#optimizing-apache-for-a-linode-1gb

I think you are using nginx for static file serving. you may also consider serving whole site with nginx (+php-fpm with caching like fastcgi and php-opcode). I was hosting my android apk site (Mod note: link removed. Don't advertise your site when helping people, please.) with linode 1GB. with apache, site was too slow and mysql server was stopping time to time due to low memory (didn't know what went wrong). but things are smooth since i moved my site to nginx. you can see my site: (Mod note: link removed. Don't advertise your site when helping people, please.)

@asimhakim's recommendation was something I've done before, and I can't recommend it enough. Get off Apache and use Nginx with PHP5-FPM. Your memory usage will decrease by leaps and bounds.

@asimhakim:

64M limit is enough for most wordpress installs however you may increase it to 128M to see how things go.

apache is memory eater, with incorrect settings, 1GB can be easily exhausted. you can see this article to optimize apache https://www.linode.com/docs/websites/ho … linode-1gb">https://www.linode.com/docs/websites/hosting-a-website#optimizing-apache-for-a-linode-1gb

I think you are using nginx for static file serving. you may also consider serving whole site with nginx (+php-fpm with caching like fastcgi and php-opcode). I was hosting my android apk site [](MOD NOTE: URL removed)[MOD NOTE: URL removed](MOD NOTE: URL removed) with linode 1GB. with apache, site was too slow and mysql server was stopping time to time due to low memory (didn't know what went wrong). but things are smooth since i moved my site to nginx. you can see my site: [](MOD NOTE: URL removed)[MOD NOTE: URL removed](MOD NOTE: URL removed)

Can you share the nginx tutorial with me?

We have a guide on configuring Nginx here: https://www.linode.com/docs/websites/ng … erformance">https://www.linode.com/docs/websites/nginx/configure-nginx-for-optimized-performance

I use HHVM+NGINX now seems ok for now

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct