This Is How To Optimize A Wordpress Site To Stay Under Siteground's Account Execution Limits

Posted: May 2 2016, 11:20am CDT | by , Updated: May 2 2016, 11:26am CDT, in News | Technology News

This Is How To Optimize a Wordpress Site to Stay Under Siteground's Account Execution Limits

Inside the Geek Mind. Shared hosting is dirt cheap, but there is a big caveat. Your sites need to be optimized to not use too much server resources.

I have already posted about how I built and launched a news website on Wordpress for under $50. I hosting now over a dozen sites on the Siteground GoGeek account for $14.95 per month. Migrating from Drupal and building a Wordpress site was the easy part. The really difficult challenge was to make the Wordpress sites use less server resources than the Siteground's limits.

Siteground requires that an account stays under a certain amount of Account executions. An execution is when a visitor opens your website, and your index.php file is loaded. There are several things that can be done to reduce the number of account execution including the use of caching and CDN. The most important step is to prevent bad bots from crawling your site.

The number of bots hitting even a new web site is staggering. Of course you want the Googlebot come by as often as possible, but most other bots are just free loading. Some bots are though extremely pushy. The nice ones you can regulate with a robots.txt crawl limit (Crawl-delay: 120).

Many of the bots do not care and can't be even stopped in the .htaccess file with RewriteCond %{HTTP_USER_AGENT} ^Botname, which is the common way to curb bot traffic.

The better solution is to use SetEnvIfNoCase User-Agent "^Botname" bad_bot. If that fails as well, you need to deny access on the IP address level. The Siteground support is supplying reports with the IP addresses with the highest number of page hits. You just keep on excluding bots in the .htaccess file until the traffic is only from real users and from nice bots.

Despite Siteground's suggestion, I was able to keep the Googlebot untouched and did not limit th crawl rate. You can find a sample of the .htaccess file I use here.

Protecting your site against bad bots is not enough to reduce the account executions to stay under the limits. Siteground offers a complete caching solutionw with SuperCacher. To fully enable it you switch on Level 3 (Memchached) in Cpanel.

Next is to configure a CDN. Siteground's CPanel has Cloudflare configuration built-in. You only need to make sure to edit your DNS to add CNAME for www point to and a reverse CNAME for cloudflare-resolve-to point to your server.

Once that settled, you optimize the Wordpress cron job and make it native. To disable Wordpress' cron call add define('DISABLE_WP_CRON', true); at the end of the wp-config.php file in your Wordpress root directly. Then go to CPanel and add a cron job that calls /usr/local/bin/php /home/<username>/public_html/wp-cron.php every 30 minutes. Important. Make sure you put the username of your Siteground account in the url to the wp-cron.php file.

Last step is to limit Wordpress's Heartbeat. With the Heartbeat Control plugin you can disable it completely or set it to lower frequency and limit where its called. Heartbeat is keeping multiple users of Wordpress updated who is editing which story. If you are the only editor, you can completely disable it.

This was it for me. I am now running since several days a dozen sites below the account execution limit. The sites have not much traffic, but as soon as they do, they make money and I can move them to dedicated hosting.

This story may contain affiliate links.


Find rare products online! Get the free Tracker App now.

Download the free Tracker app now to get in-stock alerts on Pomsies, Oculus Go, SNES Classic and more.

Latest News


The Author

<a href="/latest_stories/all/all/2" rel="author">Luigi Lugmayr</a>
Manfred "Luigi" Lugmayr () is the founding Chief Editor of I4U News and brings over 25 years experience in the technology field to the ever evolving and exciting world of gadgets, tech and online shopping. He started I4U News back in 2000 and evolved it into vibrant technology news and tech and toy shopping hub.
Luigi can be contacted directly at ml[@]




comments powered by Disqus