Website cleanup
Permalink
Hi, I really need some help to cleanup my site.
My site is over 4 years old. I have around 1,800 web pages and the total page versions stands at 11139 now. I have a lot of image files but should be less than 1000.
My hosting company Bluehost is saying my site file count is 449663 and I have to cut it down to 200000. Also I have more than 9740 directories and I have to cut it down otherwise my account will be deactivated. I have went in to clear trash and spam (which has nothing there).
Does anyone know about this file userquota.1 under the temp directory as attached whether it can be deleted or not?
I have never been able to run the automated batch job under control panel to delete old page versions > than 10. I was doing the delete manually, one page at a time but it always run for about 200 pages and reset back to 0. Any suggestion on how to set up a background batch job to delete old page versions say > than 5?
Are there any other files or temp files than can be deleted on a regular basis?
Really appreciate if some one can help here.
Many many thanks!
Vicky
My site is over 4 years old. I have around 1,800 web pages and the total page versions stands at 11139 now. I have a lot of image files but should be less than 1000.
My hosting company Bluehost is saying my site file count is 449663 and I have to cut it down to 200000. Also I have more than 9740 directories and I have to cut it down otherwise my account will be deactivated. I have went in to clear trash and spam (which has nothing there).
Does anyone know about this file userquota.1 under the temp directory as attached whether it can be deleted or not?
I have never been able to run the automated batch job under control panel to delete old page versions > than 10. I was doing the delete manually, one page at a time but it always run for about 200 pages and reset back to 0. Any suggestion on how to set up a background batch job to delete old page versions say > than 5?
Are there any other files or temp files than can be deleted on a regular basis?
Really appreciate if some one can help here.
Many many thanks!
Vicky
There was an issue with the remove old page versions job that if there were 10000 old page versions, it tried to remove 9990 versions all in one go, running out of server resources in the process.
I don't know if that issue still exists. There was some discussion about it on github before 5.6.2.
Theoretically, it could be possible to re-write the sql within that job to limit it to say 100 deletions at a time, so it steadily nibbles away until things are back under control. I have not looked in detail at doing that.
Any sql experts reading are encouraged to investigate and post a modified job or query.
I don't know if that issue still exists. There was some discussion about it on github before 5.6.2.
Theoretically, it could be possible to re-write the sql within that job to limit it to say 100 deletions at a time, so it steadily nibbles away until things are back under control. I have not looked in detail at doing that.
Any sql experts reading are encouraged to investigate and post a modified job or query.
Back to the original topic. While the old versions issue needs sorting out, it is not the root of your problem.
Some places to look for unwanted files that you could delete with ftp:
- old concrete5 versions from /upgrades before the upgrade you are currently running.
- the entire contents of the /files/cache directory (but not the directory itself)
- the entire contents of the /files/trash directory (but not the directory itself)
- any backups in the /files/backups directory and subdirectories (but not the directory itself) - but make sure to download a copy of all key backups before deleting.
@mlocati has an addon Files Cleaner currently in the PRB.
http://www.concrete5.org/marketplace/addons/files-cleaner/... (the link won't work until the addon is approved)
You could try contacting him directly for a beta copy
Some places to look for unwanted files that you could delete with ftp:
- old concrete5 versions from /upgrades before the upgrade you are currently running.
- the entire contents of the /files/cache directory (but not the directory itself)
- the entire contents of the /files/trash directory (but not the directory itself)
- any backups in the /files/backups directory and subdirectories (but not the directory itself) - but make sure to download a copy of all key backups before deleting.
@mlocati has an addon Files Cleaner currently in the PRB.
http://www.concrete5.org/marketplace/addons/files-cleaner/... (the link won't work until the addon is approved)
You could try contacting him directly for a beta copy
Hi,
Thanks for all your reply.
I was not able to run the dashboard/optimization/automated job and run under batch mode. This is error that I've got.
"Fatal error: Call to a member function executeJob() on a non-object in /home6/nourishu/public_html/updates/concrete5.6.1.2_updater/concrete/core/models/job.php on line 239"
The userquota file is a text file under tmp directory and must be created by Bluehost which they have asked me to look at. It shows a long list of temp files used by previous upgrades. I am attaching the file again. Please help me to see which directories I can delete from the system.
It seems like the problem is mostly with cache files. There are cache objects as old as from Oct.2011. Even clearing cache from dashboard is not clearing cache objects. Is is OK to clear all cache objects files?
Also C5 is creating too many directories of indexes and there is not a maintenance job to get rid of the old ones. Is there any add-on which can do the job?
Thanks for any comment that you may have!
Thanks for all your reply.
I was not able to run the dashboard/optimization/automated job and run under batch mode. This is error that I've got.
"Fatal error: Call to a member function executeJob() on a non-object in /home6/nourishu/public_html/updates/concrete5.6.1.2_updater/concrete/core/models/job.php on line 239"
The userquota file is a text file under tmp directory and must be created by Bluehost which they have asked me to look at. It shows a long list of temp files used by previous upgrades. I am attaching the file again. Please help me to see which directories I can delete from the system.
It seems like the problem is mostly with cache files. There are cache objects as old as from Oct.2011. Even clearing cache from dashboard is not clearing cache objects. Is is OK to clear all cache objects files?
Also C5 is creating too many directories of indexes and there is not a maintenance job to get rid of the old ones. Is there any add-on which can do the job?
Thanks for any comment that you may have!
It is always safe to ftp into the site and empty out all files in the cache directory.
Before doing so, switch of the cache. Then when you are finished, switch it on again if you really want to.
Before doing so, switch of the cache. Then when you are finished, switch it on again if you really want to.
Thanks John,
I will clear the cache directory.
Also, I have found there are a lot of files under these directories should be deleted,
public_html/updates
public_html/files/tmp
public_html.old/updates
public_html.old/files/tmp
files/tmp
what do you think?
I will clear the cache directory.
Also, I have found there are a lot of files under these directories should be deleted,
public_html/updates
public_html/files/tmp
public_html.old/updates
public_html.old/files/tmp
files/tmp
what do you think?
Without knowing how your webspace is set up, I cant be sure.
In public_html/updates/ you must keep the current update. Previous updates can be deleted.
You can probably delete the contents of public_html/files/tmp/, but to make sure, before deleting them download an offline copy. That way if you later notice a missing file you can put it back.
public_html.old/ sounds like it could be an old version of the site or even a previous site. If there is nothing in use within there, you may be able to delete it all. However, I am making a big guess/assumption here that could be disastrous if I am wrong. So double check and download a copy before you do any deleting.
In public_html/updates/ you must keep the current update. Previous updates can be deleted.
You can probably delete the contents of public_html/files/tmp/, but to make sure, before deleting them download an offline copy. That way if you later notice a missing file you can put it back.
public_html.old/ sounds like it could be an old version of the site or even a previous site. If there is nothing in use within there, you may be able to delete it all. However, I am making a big guess/assumption here that could be disastrous if I am wrong. So double check and download a copy before you do any deleting.
Hi John,
Thanks for your help. I am posting a bug post to get C5 team attention to put proper housekeeping into the core system.
As from the userquota file that Bluehost created, just the first few lines suggested where the bulk of the problem is:
12424 : /home6/nourishu/public_html/files/cache_objects
12424 : /home6/nourishu/public_html.old/files/cache_objects
12424 : /home6/nourishu/files/cache_objects
12423 : /home6/nourishu/public_html/files_bak/cache_objects
3046 : /home6/nourishu/files/cache
3017 : /home6/nourishu/public_html/files/cache
2914 : /home6/nourishu/public_html.old/files/cache
2771 : /home6/nourishu/public_html/files_bak/cache
1000 : /home6/nourishu/public_html.old/files/tmp
640 : /home6/nourishu/files/tmp
552 : /home6/nourishu/public_html/files/tmp
476 : /home6/nourishu/public_html/updates/concrete5.6.1.2_updater/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.6.1.1_remote/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.6.0.2/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.5.2/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.5.2.1/concrete/libraries/3rdparty/Zend/Locale/Data
476 :
I think by deleting files under cache directory will solve most of my problem. The rest I will just leave it for now. I think the dashboard clear cache routine should be changed to do better cleanup.
Anyway, I deeply appreciate your help.
Best,
Vicky
Thanks for your help. I am posting a bug post to get C5 team attention to put proper housekeeping into the core system.
As from the userquota file that Bluehost created, just the first few lines suggested where the bulk of the problem is:
12424 : /home6/nourishu/public_html/files/cache_objects
12424 : /home6/nourishu/public_html.old/files/cache_objects
12424 : /home6/nourishu/files/cache_objects
12423 : /home6/nourishu/public_html/files_bak/cache_objects
3046 : /home6/nourishu/files/cache
3017 : /home6/nourishu/public_html/files/cache
2914 : /home6/nourishu/public_html.old/files/cache
2771 : /home6/nourishu/public_html/files_bak/cache
1000 : /home6/nourishu/public_html.old/files/tmp
640 : /home6/nourishu/files/tmp
552 : /home6/nourishu/public_html/files/tmp
476 : /home6/nourishu/public_html/updates/concrete5.6.1.2_updater/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.6.1.1_remote/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.6.0.2/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.5.2/concrete/libraries/3rdparty/Zend/Locale/Data
476 : /home6/nourishu/public_html/updates/concrete5.5.2.1/concrete/libraries/3rdparty/Zend/Locale/Data
476 :
I think by deleting files under cache directory will solve most of my problem. The rest I will just leave it for now. I think the dashboard clear cache routine should be changed to do better cleanup.
Anyway, I deeply appreciate your help.
Best,
Vicky
The Clear Cache dashboard command should clear your current cache folder. I suspect the problem is that you seem to have many old copies where the cache folder was not cleared before copying.
Once you have everything running smoothly, you may want to install (and then run regularly) my Cache Vac job adon (free).
Once you have everything running smoothly, you may want to install (and then run regularly) my Cache Vac job adon (free).
Hi John,
Thanks for all your help and Mike. Now that I have done the cleanup, I will get your add-on.
Best,
Vicky
Thanks for all your help and Mike. Now that I have done the cleanup, I will get your add-on.
Best,
Vicky
What do you mean when you say that you've never been able to run the job that removes old pages? What happens when you try? There is a free add-on called 'Nontab Scheduler' that runs your jobs and there is a paid add-on called 'FlexJob Scheduler' that is more flexible and powerful but if your system is broken so it won't run any jobs then these add-ons are unlikely to help much.
What folders are in your [root]/files folder other than numbered ones? Is there a 'tmp' or 'temp' that's full of 'session' files?
I don't know what the 'userquota1' file is. It's not a concrete5 file so I would rename it and see what happens but that's only one file... you need to find 250,000 files to get rid of.