I recently was contacted by a user of my AWSOM Pixgallery plugin to help with an issue that was affecting her install. For some reason whenever she loaded her main page or Categories page her website slowed down to a crawl. At first I didn’t think that it was related to Pixgallery, since it only does one function on non-gallery pages, which is to check if the global resize setting is active and apply it to images if it is. On her site this setting was disabled, so Pixgallery should have been doing nothing.
It did turn out though that whenever Pixgallery was active, this slowdown behavior would occur, with it disappearing after Pixgallery was disabled. The bizarre thing was that her galleries pages were loading totally normally.
My first thought was that there were permissions issues with her images. After checking her server there were some issues with some of her files being set to non-execute, but this did not clear up the problem. I was honestly going a bit crazy and started to think that I had coded something incorrectly with the newest Beta version that she was using.
I then had a sudden thought: in Filezilla, the ftp program I tend to use most, the settings by default do not show the owner of the files on the server–so I turned this view on. Typically looking at the owner of files isn’t a big issue since if you are moving your files to the server using the same account and ftp program they all have the same owner–>the account that is used to log into the server. After I changed the view I discovered that a large number of her files were actually owned by an entirely different owner/group account. In cases like this, especially if your WordPress has plugins that actually do processing things to files (like Pixgallery), if the files to be processed are not part of the Owner/Group of the program that is doing the actions (WordPress) what actually happens is the file sits there and refuses to allow any action to take place–but importantly does not actually cause an error to occur. It simply stands the code off and does nothing, causing a php execution timeout. Typically this setting in php is set to 15-30 seconds, which was the exact amount of time per image that was being added to her load time for her index and category pages.
It turns out that her ftp login and her web based Cpanel login were somehow under 2 different ownership/group listings.
The solution to the problem was for her to download her entire site, log in as the account she planned to use primarily for moving files to her server, then re-uploading the entire thing under the one account. This fixed everything and her site was running correctly again.
So, if you ever hit an issue where there seems to be a lag occurring that you can’t identify, make sure all of your file ownership is under the same account.
I am having major SLOOOOOW down on my WordPress 2.3 site. How much do you charge to troubleshoot and fix?