Move the uploads folder in Wordpress
- by Victor Hurdugaci
Currently, my Wordpress' upload folder is located in \wp-content\uploads.
Initially there was no structure so all files were put there. After a while it was changed to upload the files in \wp-content\uploads\YEAR\MONTH. Now that folder contains a mix of files (those starting with + are folders) like:
+wp-content
| +2010
| | +02
| | | File-1
| | | File-2
| | | ..
| | | File-n
| | +01
| | | File-1
| | | File-2
| | | ..
| | | File-n
| +2009
| | +12
| | | File-1
| | | File-2
| | | ..
| | | File-n
| | +11
| | | File-1
| | | File-2
| | | ..
| | | File-n
| +..
| | | ..
| Unstructured-file-1
| Unstructured-file-2
| ...
| Unstructured-file-n
Based on the dates of the unstructured files, I would like to move them in a structured hierarchy (based on date, move it to a folder \wp-content\uploads\YEAR\MONTH).
Now, my questions are:
Where do I write and execute a script to the movement (I don't have full access to the server, just to a cPanel and to the Wordpress Admin page)?
What must be updated so that the links in posts, that reference the unstructured files, point to the new location of those files?
Not fully related to the previous description: is it alright to move the whole uploads folder to another location, like \uploads?
PS: Moving the files/updating the database manually is not an option :)