Report this

What is the reason for this report?

How to reduce the server response time? Taking too long to respond!

Posted on February 25, 2017

Hello, its been more than a week now since I have migrated my blog from shared hosting to the DigitalOcean’s $20/ month plan. I was expecting better performance, but then I ran some tests and the results were not so impressive. The response time is too much. Even on the shared hosting the load time of the blog was around 2.5 seconds and 3 sec at max, while now, it is more than 4.5 or 5 seconds. As of now, the response time of the blog is around 1 to 1.6 seconds and this is not happening for only the homepage but for all the pages of the blog.

I don’t have much knowledge about server optimization, but totally aware of the fact that my server needs some tuning to perform properly.

Can anybody please tell me that how can I decrease this response time to the minimum and how can I make my blog to load faster or how to optimize the performance of my server.

Details - blog - http://thatsbreaking.com OS - CentOS CMS - WordPress cPanel - Yes.

Let me know if I need to share more information. Thanks and have a nice day!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Some tips for speed optimization of the Laravel website

Google Maps or some other 3rd party tools might generate some errors that in turn, decide your speed. Also, heavy CSS and JavaScript needed to be refectories to make them smaller.

The best way is to use a template that is well coded and does not use many plug-in. Configure web servers.

Your web server needs to be configured properly to improve the speed of the web application. What a web server does? It controls gzip and cache settings that are required for a high ranking score. What to do for web server configuration?

For caching, enable caching on JS/CSS/Images for at least 7 days. For gziping, you need to gziped all your files to improve the page speed score. Hire Laravel developers from a leading Laravel development company who have in-depth knowledge and experience of configuring web servers. Ask them about it while taking their interviews.

Laravel configuration:

For Laravel application configuration, you need to do the following things.

  1. Minify CSS/JS It is very easy and can be done by using tools such as Elixir. You can also do it by manually minifying and combining your CSS/JS.

  2. Minify HTML There are different packages available for minifying HTML automatically.

  3. Cache 3rd party resources The main issue arising here is that Google Analytics sets a low cache time and Page Speed Insights requires a long cache time. You need to catch the script locally temporary to improve the page speed.

  4. Templates putting up into Laravel Once you have selected the template for the website; you need to put it in Laravel. First of all, you need to copy assets.

I have been getting “Reduce server response time” issues with the Pagespeed Insights tool.

To test whether it is due to some slow PHP script or Wordpress or hosting issue, I duplicated my website at Digitalocean and pasted it in Google Cloud - Google Compute Engine instance.

Problem solved! In Google Cloud I’m able to get faster server response times and pass the Pagespeed test with flying colors even with the smallest VPS in gcloud.

So it’s not due to PHP or Wordpress. Digitalocean server has server response time issues. The difference was between 300ms and 1s.

Which version of PHP ?

Are you sure you’ve running CentOS, because your server says it’s Ubuntu (from the Server-header) ?

Running the site through WebPageTest.org from Singapore says it’s Time to First Byte is about 0.5 seconds, so where are you seeing the 2.5 to 5.0 seconds response ?

Depending on the amount of plugins in your WordPress, that’s usually the first place to start removing some and replacing others with better ones. I would recommend installing a certificate (LetsEncrypt is free) and run your site over HTTPS, since this will allow the use of HTTP2, which uses only one connection.

There’s a ton of different optimizations that can be done to Apache, PHP and MySQL, but it’s important to look the right place, so you need to give further details to pinpoint where to start.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.