Reduce RAM usage for your WordPress websites

I’m using for most of my servers ServerPilot as the server management tool. With ServerPilot your server will be installed an optimized with Nginx and PHP-FPM. This configuration makes your server very fast.

If you host multiple WordPress websites on your VPS you need to check the RAM memory usage frequently. Even if your WP sites doesn’t have a lot of traffic, they might consume a lot of memory. One of the reason might be the dynamic PHP-FPM configuration, which is very good because each site will respond fast even after some time of inactivity. This happens because there is always at least one active task running inside the applications PHP-FPM pool. If your website becomes more active, it’s possible that a websites pool will activate (and keep) more than one tasks. At this moment your low-traffic website might consume more than 250MB of RAM memory! Continue reading Reduce RAM usage for your WordPress websites

Store your Twitter API results with Memcache

Recently I needed a dynamic cache function for some PHP based, custom website. Most pages are a kind of mash-up with different results and one of them was dynamic Twitter feed that shows the latest tweets for some static “search” value.

Using the PHP library Twitter OAuth by Abraham is it very easy to create a Twitter search or any other Twitter API request. The only preparation you need to do is, create an app in the Twitter developer section. Continue reading Store your Twitter API results with Memcache