Common reasons for poor website performance

You may sometimes notice that your website does not perform as well as it should. Unfortunately the causes for poor performance are wide and varied. This article describes some of the reasons to help you diagnose why your website might perform poorly and to provide tips on how to improve it.

Optimizing your site


Make sure your web documents embody the best practices in web page development. These include, but are not limited to:

Use semantically-appropriate and valid markup 
HTML or XHTML elements should be used to describe their content. For example, a blockquote element should contain quoted text and not be used to create a text indentation. Your documents should be validated and (where appropriate) well-formed.
Use absolute or relative paths 
When linking to local resources (images, video, JavaScript, etc.) within your documents, use either absolute (also called relative from root) or relative paths. Using a remote path (such as a URL) will cause an additional and unnecessary HTTP request.
Use CSS 
Use CSS for controlling the presentation of your documents. External CSS files are cached by the browser, reducing overall page-load times. Do not use HTML tables to control page layout (unless presenting tabulated data) because they significantly increase a document's markup footprint. When possible, external JavaScript and CSS files should be combined. It is always faster to load one large file than it is to load a few dozen small files.


You can reduce the file size of media such as images, videos, and music by using compression techniques. Background images, particularly those that are tiled, can usually stand up to extra compression. Make use of separate image thumbnails where large images are not needed. Try to avoid high definition images on the majority of your pages. Having a megabyte or more of images will seriously slow down your site because it takes longer to download all of the site files.


Sometimes a poorly-written script, or a script that conflicts with other site elements can lead to a slow site and poor performance. Try running a full page test at:

Any scripts that take a long time to load should be investigated to see if they can be better optimized. It may also be worthwhile to turn off any scripts that look problematic to test and see if deactivating them leads to an improved performance.


Try installing PHP FastCGI. It keeps PHP sessions running so it doesn't have to instantiate every time someone hits your web site.

DreamHost VPS users can use XCache. It caches compiled PHP code in memory for later requests.

Make sure to test all PHP scripts. PHP scripts that do not properly end can cause processes to be skipped for hitting the FCGI process limit, which can cause site slowness.


For WordPress, review the WordPress optimization articles.

For MediaWiki, enabling the file cache can improve performance. Here's more info on how to enable the file cache.


Your MySQL database might run slowly if it has a lot of overhead. Overhead is caused by rows being deleted, leaving empty space. The more active a database is, the more overhead there may be.

You can cleanup overhead within phpMyAdmin. For example, log into phpMyAdmin and view the Structure of your database. At the bottom, click 'Check tables having overhead'. Then select the pulldown 'Optimize Tables'.

You can also cleanup overhead via a shell script and/or cron job. You may want to run a monthly cron job to do this for you. A cron job entry might look like so:

/usr/bin/mysqlcheck -o -v -u USER -p PASSWORD -h MYSQL.EXAMPLE.COM DATABASENAME;

Replace the items in all-caps with values appropriate for your site.

Make sure that spam comments are not making it take longer to access your database. Akismet is a very useful plugin for WordPress that helps you eliminate spam comments which can speed up your site.

Internet issues

Data passing between a user agent and a web server traverses the Internet by means of a packet switching system that may encompass a dozen or more nodes, depending on the physical locations of the user and the web server.


Main article: Traceroute

One major reason for poor site performance is when one or more "hops" taken by data packets passing through the Internet are obstructed or delayed. Traceroute is often used for network troubleshooting. By showing a list of routers traversed, it allows the user to identify the path taken to reach a particular destination on the network. This can help identify routing problems or firewalls that may be blocking access to a site.


Some users may suffer from a poorer performance more than others. This may be the result of problems with a particular Internet Service Provider (most often, if it is one of the large Online Service Providers, such as AOL). Network congestion, bandwidth throttling and restrictions, data discrimination and filtering, and even content filtering can all result in poor site performance.

Network issues

Make sure to test your own local Internet speed at a site such as This may help to confirm where the slowness is originating.

Web server

Check the load, users, uptime, and so on.

See also