Results 1 to 21 of 21
-
01-15-2018, 12:49 AM #1Aspiring Evangelist
- Join Date
- Dec 2009
- Posts
- 360
How to reduce inode count of wordpress site without changing shared plan
hello friends,
One of my client is hosting a wordpress image site with qhoster with approx 3k+ posts and 1200 uv daily
recently his inode count reached 99%
how to educe the inode count ?
clear cache ?
delete posts ?
he is not ready to change plan
-
01-15-2018, 02:00 AM #2Junior Guru
- Join Date
- Sep 2016
- Location
- India
- Posts
- 218
You should remove unnecessary files from the server. inode refers to the number for files. Deleting post would not help you instead delete uncessary files which include old cache, logs, images, scripts, etc.
-
01-15-2018, 06:02 AM #3Newbie
- Join Date
- Jan 2018
- Location
- Estonia
- Posts
- 10
Hello.
Usually reason of high inode usage are old session files. Probably could be found in directories with temporary files, such as temp/.
Deleting unnecessary files such as themes, unused plugins and etc. wont help alot.
Also check website cache.
-
01-15-2018, 06:05 AM #4The Linux Specialist
- Join Date
- Mar 2003
- Location
- /root
- Posts
- 23,981
Have him check his account and delete files he do not need. Probably some trash files there hiding somewhere. Time to start scanning :-)
Specially 4 U
Reseller Hosting: Boost Your Websites | Fully Managed KVM VPS: 3.20 - 5.00 Ghz, Pure Dedicated Power
JoneSolutions.Com is on the net 24/7 providing stable and reliable web hosting solutions, server management and services since 2001
Debian|Ubuntu|cPanel|DirectAdmin|Enhance|Webuzo|Acronis|Estela|BitNinja|Nginx
-
01-15-2018, 10:01 AM #5Web Hosting Master
- Join Date
- Dec 2006
- Location
- London, UK
- Posts
- 1,635
Check any email accounts as well - they can use up a lot of inodes.
Phil McKerracherI do server maintenance and troubleshooting
-
01-15-2018, 10:20 AM #6Aspiring Evangelist
- Join Date
- Sep 2015
- Posts
- 434
There are several options available, I think the two best options would be:
1. (Quick fix): Go through the account and remove any old files which are not needed and emails. The emails can be saved locally and/or backed up offsite then you might have files you just don't need which can be cleaned out.
2. (Long term fix): Being an image site, potentially your client could shift those images onto external storage and then remove them from his site so they no longer count as an inode. For example, S3 or BackBlaze could host the images and then they be served on the site.
What exactly is the inode limit on the account?
-
01-16-2018, 03:32 PM #7Web Hosting Master
- Join Date
- Mar 2009
- Location
- Miami, Florida
- Posts
- 20,777
-
01-16-2018, 05:58 PM #8Junior Guru Wannabe
- Join Date
- Apr 2012
- Location
- Tallinn, Estonia, EU
- Posts
- 92
If you have now inodes limit red zone, so it's time to divide website services between hosts –*first of all, external email (simply modify mx in the DNS settings), the second step – external static images migration (this step could be made with CDN, another benefit – using this external service will significantly increase the website overall page speed).
█ EUROPEAN NETWORKS -- www.en.ee
█ VPS / Dedicated Servers / Colocation / Private Cloud
█ DE/EE Locations - HP/Supermicro Hardware - Great Support
█ Facebook: fb.com/EuropeanNetworks
-
01-16-2018, 07:10 PM #9
Your script should be automatically emptying the cache folder (usually the culprit) which stores thousands of files using up inodes limit.
With help from provider/system admin, you can work out which folder is filling up and then set up a cronjob to clear the folder of old unused files every so often to keep the inode limit down.
What is your inode limit set to? Some have it way too low while others offer 250-500k plus. You may simply just need a higher limit in order for the script to function properly. Or you may clear the old files manually as I mentioned before.HostXNow - Shared Web Hosting | Semi Dedicated Hosting | Enterprise Reseller Hosting | VPS Hosting
-
01-16-2018, 07:58 PM #10Web Hosting Master
- Join Date
- Dec 2011
- Posts
- 1,460
Not sure you've thought that suggestion through - since a client that's unwilling to upgrade their single plan to increase their inode limit is even less likely to be willing to buy a second hosting plan entirely just to offload mail service to... or buy a CDN. Or buy... anything at all.
@sash_007 is dealing with a cheapskate - which means the only viable option to recovering inodes without increasing costs is to delete files. Cache, mail, old uploads... something has gotta give."I've seen spam you people wouldn't believe. Routers on fire off the OCs of AGIS. I watched MXes burning in the dark near the Cyberpromo Gateway. All those moments will be lost in time, like tears in rain. TTL=0."
-
01-17-2018, 12:06 AM #11Aspiring Evangelist
- Join Date
- Dec 2009
- Posts
- 360
Current inode limit is 50k
i asked host if i can delete tmp files inside webalizer ,webalizerftp.. he replied you can delete some files
also there are files inside awstats
check screenshot https://i.imgur.com/YWufXV7.jpg
i was wandering if i can take local backup of this folders on my pc and then delete those files inside those folders
-
01-17-2018, 12:44 AM #12Aspiring Evangelist
- Join Date
- Apr 2003
- Location
- Burlington, WI
- Posts
- 408
Type this in shell in the root directory if his site to see what's taking up the inode usage. Run in subsequent folders for more details.
find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rnDont forget the unix guru's guide to sex:
gawk; talk; nice; date; wine; grep; touch; unzip; strip; touch; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; make mrproper; sleep
-
01-17-2018, 01:11 AM #13Web Hosting Evangelist
- Join Date
- Mar 2012
- Posts
- 525
-
01-17-2018, 02:30 AM #14Junior Guru
- Join Date
- Jan 2007
- Posts
- 235
One thing that many people miss is that Wordpress doesn't just upload one version of each image. Depending on the theme or different plugins installed, you could have a dozen or more images being created for EVERY image you upload. So if an image gallery plugin tells Wordpress it needs five different sizes (to use in different gallery layouts, for example), and a theme has 4 different thumbnail sizes it needs for different layouts, and Wordpress itself needs a small, medium and large, etc.......it can really add up.
So you need to look in your images directory and you will be able to see how many sizes of each plugin there are. If there are a lot, you may need to investigate each plugin that is creating them, and set it to not create so many. Or you can also disable a certain size in your functions.php file.
Once you have properly disabled the different sizes, that won't delete all the previously uploaded variations. You will need a plugin like Force Regenerate Thumbnails, which will delete all current thumbnails/image sizes and recreate them based on your new settings. BE WARNED that most plugins designed to regenerate thumbnails do NOT delete the old versions. That's why I suggested Force Regenerate Thumbnails, because it does.
Addressing this across your whole Wordpress media library can clear up a lot of inodes if you are running an image site. It may not be your only problem, but definitely somewhere to look.
Brent
-
01-17-2018, 06:27 PM #15Aspiring Evangelist
- Join Date
- Dec 2009
- Posts
- 360
Hey your point is pretty valid and i checked uploads folder inside wp-content directory
there i see wp generates 3 images for each image upload
i was reading this article here
1. Original image size
2.150px x 150 px i think this for media library
3.225 x 300
4. in some cases i see 4 the image also of the same size of original image
also i see 20-30 unattached images in media libary
so my query is if my client deletes 3 images or post for every 3 images uploaded will that mean the deleted images also get deleted fromuploads directory ? or he have to manually delete those ? and will it help to keep the inode count constant ?
i also want to know if i use your recommended plugin will it stop generating thumbs for media library also ?as thats needed for future reference of deleting any image by date from media library ?
but i cant find add_image_size in functions of theme. which is used to generate image thumbsLast edited by sash_007; 01-17-2018 at 06:31 PM.
-
01-17-2018, 06:34 PM #16Aspiring Evangelist
- Join Date
- Dec 2009
- Posts
- 360
-
01-17-2018, 07:01 PM #17Knowledge is all
- Join Date
- Jul 2005
- Location
- here, there, where?
- Posts
- 4,097
Before diving in to removing posts or images, you will want to find out if that is the most usage. See if the host can provide a inode usage report, for example using the command from @ForgottenTech . However, if you remove a post I believe the image is still there, so it has to be removed from the media library. You can also use a plugin to clear unused images. Lets say the wordpress install with all plugins, themes, etc use 5,000 inodes, which is about 3 times the number that a stock install uses, that leaves 45,000 for images and other such uploads. Does the site have any where near 10,000 images (unique and not the "related ones")? If so, then that is your likely culprit -- all the related images. If not, something else is chewing up inodes.
if the host wont provide a report for inode usage per directory, then you can download the install and check it locally. And since you have it locally, move to a new host since they should provide usage reports one way or another on their limits.-Steven | Cooini, LLC
"It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle
-
01-18-2018, 12:56 AM #18Junior Guru
- Join Date
- Jan 2007
- Posts
- 235
It looks like you are just getting the standard Wordpress thumbnails.
A few tips though. First of all, do NOT go deleting images through FTP or file manager. Only do it through Wordpress itself. Otherwise, the WP database won't know they are gone. WP references every image in the database.
Second, if you really want to delete certain sizes, you have to tell Wordpress which sizes you don't need. Otherwise, it will just keep on regenerating the same images. You have to use your functions.php file to remove an image size, or a plugin. The functions.php option is best if you're using a child theme. Otherwise, a plugin might be safer.
Finally, as already mentioned, don't assume this is the only cause of your inodes being eaten up. I only mentioned it because I think I saw that it is an image site, and I know this can be an issue if a site has thousands of images. But cache folders and other culprits could be the cause as well. So just take this advice as one step in addressing the problem.
Good luck.
Brent
-
01-18-2018, 01:13 AM #19Aspiring Evangelist
- Join Date
- Dec 2009
- Posts
- 360
ya there is another way to prevent wp from generating ceratin image size
that is wp media settings
where you can turn off the image thumb you want to zero and that way also it would prevent wp from creating further thumbs of that size .. i saw this article
and i also deleted some unattached images from wp media library and saw some lowering in inode count
and @ steven99
yes i think wp uploads folder images is the culprit here
as there is approx 3k posts and each post have approx 2 images with it
and wordpress creates 4 duplicate image for each image upload
so i assume there are 3000 x 8 number of images that must be adding to inode count as koolkeys pointed out and i saw drop in inode count immediately after i delete some unattached images from wp media library..still i will look for other cause
thanks everyone for their input .. i will keep updating if i see other issues
-
01-18-2018, 06:25 PM #20
Well, I think 50k inodes is too small and had you had 250k you would not have to worry about such issues so soon. A lot of providers even offer 500k now. An easier solution would be to try a different provider. But sure, still do suggestions mentioned by other members too to save you having to upgrade/pay more money unnecessarily and waste time in the future.
HostXNow - Shared Web Hosting | Semi Dedicated Hosting | Enterprise Reseller Hosting | VPS Hosting
-
01-18-2018, 07:04 PM #21Aspiring Evangelist
- Join Date
- Apr 2003
- Location
- Burlington, WI
- Posts
- 408
I agree that 50k is way low. The standard in a lot of places is 100k plus.
Dont forget the unix guru's guide to sex:
gawk; talk; nice; date; wine; grep; touch; unzip; strip; touch; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; make mrproper; sleep
Similar Threads
-
Creating a client portfolio page (or how to create a thumbnail of a site)
By cycomhk in forum Web Design and ContentReplies: 1Last Post: 04-24-2008, 10:56 AM -
How to get a copy of entire site without FTP access?
By mrzippy in forum Hosting Security and TechnologyReplies: 4Last Post: 01-23-2007, 09:52 AM -
how to test the speed of my site
By baxao in forum Other ReviewsReplies: 8Last Post: 03-21-2006, 10:47 PM -
how to make an icon of a site appear in visitors' bookmark list for all web browsers
By zola in forum Web Design and ContentReplies: 3Last Post: 08-08-2005, 12:02 AM -
How to find the webhost of a site
By MikeP18 in forum Web HostingReplies: 9Last Post: 04-29-2005, 05:49 PM