How to Speed up Your Site in Cheap Hosting

Aris M. Setiawan
7 min readMar 11, 2019

Maybe some of you already knew what I’m gonna talk about, and think that I’m gonna share ‘usual’ technique like using cache for WordPress. Well, yes and no. I’m gonna share about:

  • What PHP extensions should be active and what should be deactivated.
  • What ‘bestenvironment for WordPress (the case of my client is Company Profile). the next chapter I’m gonna talk about E-Commerce and an active blog.
  • What best plugin to cache and other plugins that will make it faster (read it until the end, you will never regret it).

Okay then, after you read above that point, you may need a little help from someone who knows about hosting setting CPanel (hit me up if you don’t know what you are doing in CPanel).

Active only PHP extensions that matter to you

It’s important to active an extensions that you needed because if your active it all, when you start PHP service it becomes slower, but it’s not gonna affect the performance YET.
One of my client cases, they activated all certain extensions that not needed at all, and when the active user increase to a certain number (let’s say 1000 hit, it depends on your server performance tho), the server always sends us error 504 mean time-out or server hang-up.
Then after I configure PHP extensions, the CPU is not high as before and we can see the server can handle request properly. BUT it’s not the best solution if the active user increase. Ok here’s my setup extensions :

This is my default setup PHP for WordPress.

Usually, the hosting will active the pgsl, pdo_sqlite, pdo_pgsql and ioncube_loader (deactivate it, I forgot to deactivate it)

PS: If you use PHP 5.4, please guys move on to PHP 7, the newest is 7.3, I’ve become developer since 2013, and it’s hella fast and the best investment to switch to a newer version. Here the comparison, you can read this:

Let’s move on to another tip.

The best environment for our site ( Company Profile study case )

The environment I talk here is the stack, most of us probably ended up with LAMP or LEMP for WordPress, Laravel, or any app that stick with PHP.

let’s talk about a static site, the static HTML is the fastest than any other stack or technique. BUT it also depends on your server/hosting how well they serve it.

If you don’t know the difference of the dynamic and static site (the context is a stack, not a content). The dynamic it’s like you go to a restaurant, the chef will process the ingredient then cook it, after that you receive the food, it’s a long process.
The static on the other side, it’s like you go to the fast food, it does not even need to warm it, you can take it and eat it right away. Now you can imagine it, that the static is the fastest way.

Be patience when you learn something new

So then, the problem we face is, we need a website that dynamic (the content can easily change by a user via admin side) but also has the speed of a static site. This is where a cache technique come in handy.

REMEMBER this is in cheap hosting, so there’s no option to cache on the fly like Varnish, FastCGI, Redis, or any other extension you can install in your VPS.

So how do I do that? I’m using cache plugin too, but it’s not enough because if you still on WordPress they still had a “little” process and it’s not the true static when I say static mean it’s true static without any process, it should direct download HTML.

So this is what I do :

  • Create a subdomain and install on WordPress here, like usual.
  • leave alone the main domain and the folder public_html.
  • Install this plugin :
  • Follow the rule of the plugin, if you can manage it, then you need to download the result of .zip and place and extract it on public_html folder
  • Done!

And try to test it. cheers :D

Some of you may ask me, “WAIT, WHAT?, so I need to re-download and upload”, no silly, you can read about it here:

Also please re-read again the description of the plugin.

Test it, you should see the difference of speed here, Let’s SPEED UP 2X NOW!

The Best Plugin To Speed Up your WordPress site

Okay, if we already do install the fastest way, why we need to install some plugin again? I will tell you here and now, what we achieve from that tutorial is to speed up how we serve, BUT the content is still a mass and may slow down on your user browser, that’s why I wrote this, to get a TURBO BOOST. So let’s speed up your site :

CACHE

There are ton’s of cache plugin out there, and something you need to know, some cache plugin is not suitable for your server/hosting. AND IF YOU ALREADY DO STATIC, you can pass it.

  • W3 Total Cache, This is the most use of cache in WordPress World, it’s great it’s free and most of all, it’s fast. BUT, I recommend you to use this cache if your hosting had a feature like OPcache or memcached. And if your server is using Litespeed, don’t bother to use this plugin, I had another recommendation to you.
  • LiteSpeed Cache, if your hosting support Litespeed, I recommend you to use this instead. It’s from LiteSpeed official, they know what they are doing, believe in them.
  • WP Super Cache, it’s from Automattic and it’s like their name, do a cache. So if your site doesn’t have a feature like LiteSpeed, OPcache, or Memcached then I’ll be going to use this plugin.

All of the 3 plugins are free, I’m not gonna share a paid one here.

CAUTION !!! if you follow this instruction, then in every setting of this plugins, Don’t active the minify or combine file here. In a rare case, they will break the style and javascript.

MINIFY AND COMBINE FILE

It’s sure when we test our site on GTmatrix or any other site test, we got a bad score and our client start to complain about it. yeah, I’ve been there too.

So what do I do? I just need to install this plugin :

There are other plugins like this one, but personally, I prefer to use this because of the result and the setting in this plugin is a great one.
What this plugin really do? disable emoji, minify the HTML, CSS, and Javascript and combine some CSS or JS file into a few files. This will increase the score.

IMAGE OPTIMIZE

Some of us may forgot or the client just don’t care about their image. Well, if the image is more than 500KB, it will slow down the site on client browser level. So what we can do? Optimize it when it upload, and we can’t optimize on our server because it will make the cpu work harder.
so we need a plugin to optimize it to other place, glad we can do that with this plugin :

With this, all of our image will be optimize and reduce the size. It’s free forever (let’s pray). No need to explain any further.

Use CDN

If you wanted to boost your site, you can use CDN, what it’s actually do? They will download our asset like Image, js, font, and css file. Then they will serve it when our user access our file. It’s make the download time faster because it’s serve from another server. And make our read write HDD efficient.

There’s no free cdn, Cloudflare is not cdn we are looking for. because the technique is different from what we need, so here’s my favorit CDN :

It’s fast and realiber, and cheap, you can top up 10$ for a 12 month usage.

Here Random Photo — WordCamp Jakarta 2018

That’s wrap how I speed up a site in a cheap hosting plan, of course there are many ways to set-up. You can freely to use this or another method, By the way I tested it and the site can handle 13K request without any error.

From here and now, all of my publication will be on english language, so you guys can enjoy it all. just click translate button if you wanted to read in your language.

Nee a help? or you wanted to share your experience? let me know what you think.

--

--

Aris M. Setiawan

Professional WordPress Theme & Plugin Developer, freelance consultant. — Available to hire