How To Rename Gallery Web Directory?

paulmcnelis

Joined: 2008-03-26
Posts: 32
Posted: Sun, 2009-08-23 02:57

I'd like to change the name of the directory that my gallery resides in on my website.

What changes do I need to make in MySql and any files in the gallery directory? (aside from renaming the directory itself)

Thanks!

 
paulmcnelis

Joined: 2008-03-26
Posts: 32
Posted: Sun, 2009-08-23 02:58

Or, do I rename the directory, and run the installer again?

Whatever I do, I want to make sure I don't lose my photos and database info.

Thanks

 
paulmcnelis

Joined: 2008-03-26
Posts: 32
Posted: Tue, 2009-08-25 04:30

anyone?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 619
Posted: Tue, 2009-08-25 04:42

If your gallery is at http://www.example.com/gallery3/index.php and you wanted to rename it to http://www.example.com/photos/index.php you would simply rename the directory and everything should work fine.

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Mon, 2009-10-19 21:58

I tried a simply rename and it almost works. The gallery comes up but all the images are blank. Blank images occur even if I tried to upload a new album. This sounds like the database needs to be updated somehow for this change! Please provide direction as it is necessary to reorganize the directory sometimes.

Thanks,

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-10-19 22:09

No, you just need to rename the directory. G3 doesn't store the urls or paths in the database. Is your var directory still under your G3 directory?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Tue, 2009-10-20 03:08

Yes it is my server so I just did "mv gallery3 gallery". My problem is solved because I created a new clone of gallery3 and started over. However it may be worth resolving this before going mainstream. I understand there should be no hard coded paths or database dependencies, but has that been verified. Rename the directory is a trivial experiment if someone can confirm it is working/broken.

Recap: I renamed my webserver gallery3 to gallery. After the change I accessed my site www.myserver.com/gallery and everything was there but the images were blank. Maybe this has something to do with ImageMagic, but the Maintenance scripts did not help.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2009-10-20 03:29

verified :)

www.example.com/gallery3/index.php

G3 loads and I'm logged in as admin

mv gallery3 testgal

www.example.com/testgal/index.php

G3 loads just fine and I'm still logged in.

Is there anything in your gallery/var/logs that indicates any errors trying to access the site after you renamed your directory? Did you happen to do an upgrade to newer code at the same time?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Tue, 2009-10-20 20:23

Thanks for doing that experiment! I was dealing with a serveradd issue at the same time (You are helping on that as well). Since your experiment worked I am assuming it was my setup. I have recreated Gallery3 from scratch with GIT.