why my website is taking 3+ seconds what to do ?

Posted October 27, 2020 295 views
PHPSecurityPHP Frameworks

hello , greetings of the day,

respects to seniors,

my website is running on digitalocean starter pack with plesk, it build on codeigniter based script, and running slow and also showing 4.2 seconds, some times , 3 seconds, what to do ? please letme know

what are the measures and steps needed to improve this,

NOTE :- I am junior, novice, new to digitalocean ,

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.

Submit an Answer
1 answer

Hi @santhosh2116 ,

There are a few things I would like to suggest you in trying to optimize both your website and server. Let’s start with the server first

Before we start, make sure you create a snapshot of your Droplet in case something gets broken and you need to revert the changes

Server Optimization

1.I’ll recommend you to upgrade to the latest possible PHP version. At the time of writing it’s php7.4.

2.Start thinking about using PHP-FPM on your server. That’s it if you haven’t already installed and configured it.

  1. Install a server side cache like Opcache.

  2. Start using Redis for a much better performance. You’ll need to connect Redis with your website.

Website Optimization

  1. Add Gzip and browser levarage caching in your .htaccess if using Apache and if you are using Nginx, add it in the configuration’s file.

  2. Use PageSpeed Insight’s tool here - to try and determine what you can improve on the website itself.

  3. Lastly, I’ll recommend using CloudFlare. It should help with accessing your website and caching it properly.