Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently managing a Website for a client of mine who gets about about 500-1000 visits minimum a day, and this includes Members uploading videos, photos, blog posts and other content.

The site itself is

For the record, I was told a number of developers worked on the site before to add customized features and functionality to the CMS that the site already runs on.

The initial load to the index page takes extremely long, and subsequent pages can range from 5 seconds - 20 seconds at any given time. In the Filesystem of the site itself exists alot of unnecessary directories and and backup folders that I believe is causing the lag on the site.

Timing the website using PingDom's tool, my results are:

Perf. Grade: 70/100

Requests: 80

Load time: 21.21s

Page size: 1.0MB

The Current Hosting plan is an Unlimited Bandwidth/Unlimited Storage package.

What is the best way to go about optimizing a site like this? I've researched about using .htaccess rules but don't know enough about them to implement them effectively for this task.

Thanks in advance.

share|improve this question

closed as too broad by Rex, TheCleaner, Ward, mdpc, Falcon Momot Apr 1 '14 at 17:25

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Probably to scrap the whole thing and start over with a decent CMS. – Michael Hampton Mar 30 '14 at 22:04
DB is a good place to start, see what slow queries you have and try and tune them with some well placed indexes you can get some massive gains. Hopefully you have some access to logs as it sounds like a web hosting plan rather than a VPS plan. – squarebear Mar 30 '14 at 22:20

You should be taking a systematic approach to determining where the bottleneck is.

Take a look at those 80 requests in your web browser's development tools;

  • Is the time-to-first-byte on the main content, or any specific resource, unreasonably high? You'll need to look at what is going on with that resource. If it's the main HTML page, then the slowness is in the code generating that page, the CMS
  • Are certain resources not even being given to the browser as a resource to load until late in the process? There might be issues with javascript dynamically loading content.
  • Are resources being loaded from a very slow external domain? Those might need to be moved.
  • Is javascript taking an unreasonable amount of CPU time? Refactoring of that javascript might be needed.

If this comes down to slow server side code, then as Michael said, the best approach will likely be starting from scratch or at least doing some major reworking.

Another option might be a cache like Varnish, which could cut the slow code out of the process of serving requests - but that might not work if you're running content that must be different from one user to another based on session.

share|improve this answer
I took a look at the site before I commented. Dollars to donuts the code is a nightmare pile of spaghetti "written" by people who have never even heard of design patterns. – Michael Hampton Mar 31 '14 at 0:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.