Nginx – wp nginx fastcgi cache vs wp super cache

cachefastcginginxWordpress

I've got a 512mb server instance with one core. As of right now I have about 3 websites with about 10k articles, on all of them I have wp super cache enabled. The typical cache time is 3600 secs or 7200 secs. And The vps instance is holding on just fine. It has only a spike of around 60% of cpu once a day.

I read that once a website reaches 30k articles, it is not a good practice to rely on wp super cache, because of the file number (linux file system) or something like that.

So I thought maybe, I should switch to using, nginx fastcgi cache. In their website they recommend this as the best practice, compared to wp super cache or w3 total cache.

Considering the amount of ram, I have available. Would you guys think fastcgi cache would be a better alternative for my sites?

What about memcached?

I have php 7.1 with opcache enabled.

Best Answer

Your 30K number is likely irrelevant. In this question someone has 8 million files in a folder.

If you have many anonymous users you'd probably be best off with Nginx page caching and a CDN like CloudFlare (simple, with a free tier) or CloudFront. An anonymous user is any user who doesn't log into the website, o. It might be more accurate to say you can cache pages that aren't personalised at all. You can't cache, for example, account balance, threads started, etc, as they're different for each user.

FastCGi caching is what I call page caching. I have a tutorial that may be interesting.

Any Wordpress plugin means PHP needs to be started. PHP is slow and memory hungry. Nginx page caching means you don't invoke PHP, so it's much much faster. I would guess Nginx page caching 10 to 100 times faster than calling PHP, and uses significantly less resources - CPU and RAM.

Memcached is a fast key / value store, but it's typically callled from Wordpress so you still have the PHP overhead.

Related Topic