Reasons for poor website performance
There are several reasons for your poor website performance. Here we highlight some core problems and give solutions for those Problem
Optimizing your CSS and JavaScript
To load jQuery, use a CDN.
If your site uses jQuery, use a CDN instead of a local version on your web server to load it into your HTML content. Using a CDN like Google to load jQuery can help to speed up page loading. This is due to the fact that your visitors have most likely already visited multiple sites that use the jQuery CDN (like Google or Microsoft). Because the jQuery library has already been downloaded to their browser, it is cached and will not need to be downloaded again. Options for jQuery CDN are listed on the following pages:
https://code.jquery.com/
https://developers.google.com/speed/libraries/#jquery
https://docs.microsoft.com/en-us/aspnet/ajax/cdn/overview
https://www.w3schools.com/jquery/jquery get started.asp
https://cdnjs.com/libraries/jquery/ \sOptimize Delivery of JavaScript
As the browser reads the webpage, JavaScript is rendered (top-down). When the browser encounters a JavaScript file, it stops rendering the page until the JavaScript file has been fully read. This is known as ‘JavaScript Render-Blocking,’ and it might create a delay in the loading of the page.
If a script isn’t required to load the page, wait until it’s entirely loaded before loading it. This can speed up the loading of the most critical elements of the page. For more information, see the following articles:
https://developers.google.com/speed/docs/insights/BlockingJS
https://www.w3schools.com/tags/att script defer.asp
CSS delivery should be improved.
CSS can also be tweaked to speed up the first page load time. For more information, see the following articles:
https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/render-blocking-css
Look for scripts that aren’t well-written.
A slow site and poor website performance might be caused by a poorly written script or a script that conflicts with other site elements. Try a full page test on one of the following websites:
tools.pingdom.com/fpt
www.webpagetest.org \sgtmetrix.com
Any scripts that take a long time to load should be looked into to see if they can be made more efficient. It may also be worthwhile to turn off any scripts that appear to be causing problems to see whether turning them off improves poor website performance.
Reduce the size of your scripts.
CSS and JavaScript files feature a lot of white space, making them easier to read for humans. When you minify your code, it removes all of the whitespace. This reduces the file size and speeds up the loading process.
A fast Google search will reveal a plethora of websites and tools for minifying your code.
Optimizing Media
Image Optimization for Media
Slowness is frequently caused by images. Because it takes longer to download all of the site resources, having a megabyte or more of photos will significantly slow down your site. Optimizing your images will go a long way toward reducing the time it takes for your page to load.
For more information, click on the following links:
https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization
Video
Make sure your videos are compressed to lower their overall size. The videos may pause/buffer as the viewer attempts to view them if they are too large.
It’s also a good idea to convert your videos to an HTML5-friendly format. This guarantees that they may be viewed by the widest possible range of browsers.
PHP
PHP OPcache is a built-in caching engine. When you enable it, your website will automatically improve in speed.
It is enabled by default on Shared and DreamPress hosting plans, so you don’t need to enable it if you currently have one of those plans.
If you have a VPS, Dedicated, or DreamCompute Hosting plan, you can manually enable it by following the instructions in the accompanying page.
Overview of OPcache
Ensure that all PHP scripts are tested. PHP scripts that do not correctly exit can cause processes to be skipped in order to avoid exceeding the FCGI process limit, slowing down the site.
Caching
A cache is a short-term storing location for several sorts of digital data. Browser caching, for example, enables webpage files such as pictures, CSS, and JavaScript to be cached (stored) in the browser. Because those files have already been stored, your browser will not need to download them again the next time you visit the same website, resulting in a speedier browsing experience.
There are numerous types of caching methods available for websites. Here are a few typical examples:
Cloudflare is a cloud computing platform (external CDN)
OPcache is a program that allows you to store data in a cache (PHP cache)
Memcached is a memory caching system (Available on Dedicated Servers)
WP Super Cache for WordPress – (Caching plugin for WordPress sites)
Use a CDN to deliver static files
Static files such as photos, video, CSS, and JavaScript can be sent using a CDN. This can help them get to the end user faster.
Databases
If your MySQL database has a lot of overhead, it may operate slowly. Excessive “overhead” (unused empty space) in your database tables might cause queries to the database to take longer, and the web server to time out before receiving a response from the database server.
For extensive instructions on how to optimize your database using phpMyAdmin or SSH, see the following article.
How can I make my database more efficient?
Internet issues
Traceroute
When one or more “hops” taken by data packets flowing via the Internet are obstructed or delayed, this is a key cause of poor website performance. For network troubleshooting, the ‘Traceroute’ tool is frequently used. It allows the user to determine the path taken to reach a specific network location by displaying a list of routers traversed. This can aid in the detection of routing issues or firewalls that may be preventing access to a site. For further details, see the Traceroute article:
Traceroute \sISP
Some users may be affected more than others by poor website performance. This could be due to issues with a specific Internet Service Provider. Poor website performance can be caused by network congestion, bandwidth throttling and restrictions, data discrimination and filtering, and even content filtering. Check with your Internet service provider to check if there are any current connectivity issues.
Network tools
Make sure to use a site like Speedtest.net to test your own local Internet speed. This can assist you figure out whether your local connection is having issues.
There are also a number of online tools that can be used to check various aspects of a network. A list of network tools and site loading tools can be found in the ‘Website tools’ article.
Web server
It’s also conceivable that a problem with the GreggHost web server where your site is hosted is to blame. For command line examples to troubleshoot your site and server, see the following article:
Troubleshooting commands for your website
Browser plugin
You can also utilize browser plugins/extensions to help you figure out what’s causing the slowdown. A excellent one to try is YSlow:
YSLow