OK, so I started my blog back in 2006, never realizing the size it would grow to, or what the future of WP and GoDaddy would bring.

1st Problem. I had read somewhere that it was better to have my image stored in a directory in the root, rather than the default path of... /myblog/wp-content/uploads/ So I chose /myblog/Photos.

2nd Problem. Back in 2006 I uploaded the image via ftp, and then used the following code in the text section of the post

Changing the name of the photo, text, size, etc. I still use this today, as it allows me complete control of the image placement.

Now here is where the fun / nightmare starts. GoDaddy says I have over 19,000 images in just the one Photo directory resulting from images, thumbnails, regenerated images etc.

How in the world can I change the image locations into more than one directory without breaking the links....besides manually editing 6,500+ posts?

  • 1
    This barely is a WordPress related question according to the site guidlines, see How to Ask and on topic, so you should add additional information to it. Besides, you should figure something out with your hoster, e.g. switching hosting plan. Having ~20k files in a directory really isn't an insanely high number, so there should be some possibilities.
    – Nicolai
    Aug 19 '14 at 12:41

You can try to reduce number of images. Wordpress creates lots of different image sizes (up to several of every image you uploaded), but actually you do not use all of them in most cases. Also during years you probably deleted/edited some posts/images, but some images are probably still on your disk, even not used in posts now.

So you can delete images not used anymore, or delete some resized images which you do not use. This will give you time to figure out how to move your break your images into more sub folders, and also you can delete few thousands of images so you will not need to do it. So, to find which images you can delete you can do it with plugin or manually:

Deleting images using plugin:

You can use this plugin, it will search your database and look if image is inserted into any post (in content, as featured image, in any custom field, anywhere...) or as background...

If image is not used anywhere it will give you option to delete it. You will get list of all images on your site not used anymore, so you can safely delete them.


and this, still work, even it is outdated


Deleting images manually:

You can also search through your media library for images which are unattached to posts and pages.

Go to media library and click the "unattached" it will display all images that may be displayed on other parts of your site or not used.


the quickest/easiest (relative terms) way I would think is to put all the currently functioning images into a single subfolder and do a bulk find-replace in the database to fix/update that (be mindful of serializing). Then, moving forward, a yearly folder structure would seem to solve your problem well. If you haven't run into an issue for this long you shouldn't need to use monthly folders like the current WP default is.

You will just have to remember that there is a grey area for this current year, or go back and fix everything from this year.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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