• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Change image folders

andysoll

Chevereto Member
I uploaded a lot of images and I didn't realize that I had the storage set to datefolders. I really need the images in a direct folder, so that the url will be the same for all images.

Is there any easy way to change the folder? (It is a lot of images just to reupload)

Hope someone can help
 
There is no easy way. You will need to manually move the images and edit the database.
 
If you want to edit database and move images...

Step 1)
Move all your images to your images folder

Step 2)
Then use phpmyadmin and run this query on your database (b sure to change the database prefix to what you used)

Code:
UPDATE chv_images SET image_storage_mode = 'direct' WHERE image_storage_mode != 'direct';
 
There is no easy way. You will need to manually move the images and edit the database.

It is over 8000 images - would it be best to just reupload them to the correct place. Or how I manually move them (if it is one by one then that is not an option)
 
Do it via ftp softwares or via cpanel if you have it...

Via ftp software like filezilla: Select all the images in folder and move it to folder above it

Via cpanel: copy/move them with the controls in control panel

Then run the above mysql query


Just to be safe side BACKUP things first
 
Last edited:
And if you are not good at that ... and if you share temp access details.. i can help you (ping me if you need)
 
It is over 8000 images - would it be best to just reupload them to the correct place. Or how I manually move them (if it is one by one then that is not an option)

I really doubt that it will best to re-upload them. By the way, you will lost the old image direct links. When using Chevereto you can switch the storage folder method at anytime and it doesn't affect the old files so your new uploads will be at /images not /images/datefolder.
 
Rodolfo,

A simple htaccess rewrite would help to retain them.

Sure but how you will map each year, month and day? We are talking about 80K images distributed in —I assume— a long period of time so is not just move the images, you will need something that logs each image old path.

So you will need 80K lines in an .htaccess file.

Another workaround could be to change the filenames to YEAR_MONTH_DAY_filename.ext so the mapping is easier but an iterator over all those files + database records will be still needed.
 
Sure but how you will map each year, month and day? We are talking about 80K images distributed in —I assume— a long period of time so is not just move the images, you will need something that logs each image old path.

So you will need 80K lines in an .htaccess file.

Another workaround could be to change the filenames to YEAR_MONTH_DAY_filename.ext so the mapping is easier but an iterator over all those files + database records will be still needed.

Just the below line should do
Code:
RedirectMatch 301 ^/images/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+).jpg$ http://www.yoursite.com/images/$4.jpg


I use the following to redirect my old thumbs to full url on one of my wordpress sites
Code:
RedirectMatch 301 ^/wp-content/uploads/([0-9]{4})/([0-9]{2})/([^/]+)-214x145.jpg$ /wp-content/uploads/$1/$2/$3.jpg
 
Last edited:
That is assuming that there aren't duplicates so only in that case the extra rules won't be needed.

This is because when you use datefolders you can have this:
/2015/04/08/image.jpg
/2015/04/07/image.jpg
/2015/04/06/image.jpg

In 80K files most likely there will be collisions but I don't think that it will be an issue.
 
yep... for similar file names the OP should do more work.

I had an issue similar to this... so been using rand names in file names from a few years.
 
I used the CPanel and move the images into the /images folder from the date folders. I test it with a could of images first and it worked fine but when I moved all the images I now cannot even access my Chevereto account and my domain linenpictures.com is now not responding at all. I can still login to the CPanel but only using the http://baboon.arvixe.com/

According to the CPanel the images are in the correct location
 
I used the CPanel and move the images into the /images folder from the date folders. I test it with a could of images first and it worked fine but when I moved all the images I now cannot even access my Chevereto account and my domain linenpictures.com is now not responding at all. I can still login to the CPanel but only using the http://baboon.arvixe.com/

According to the CPanel the images are in the correct location


I see them normal now
 
Back
Top