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

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 - OS - CentOS CMS - WordPress cPanel - Yes.

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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

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.

Server respon time occurs because of some situations, such as a high load server, or a high iowait disk, based on my experience nginx the best in terms of response time, better use ha proxy load balancer, and do not forget to choose an experienced hosting provider.