Change directory URL

Having trouble installing serendipity?
Post Reply
eckertwe
Posts: 1
Joined: Fri Oct 23, 2009 6:24 am

Change directory URL

Post by eckertwe »

Hello all. Before I begin with my post I would like to let it be known I have very little knowledge of code, programming, or any other giberish you post in reply so please try to dumb it up for me.

I have done a fresh install of Serendipity via FTP and it all works great. However, I am trying to get it installed to a subdomain http://sarah.eckerts-online.com. After install I can't reach the blog without adding /serendipity or /serendipity/index.php to the before mentioned URL. How can I change the destination to display it with http://sarah.eckerts-online.com.

Thank you in advance for any help you can provide. Again I would ask that you break your advice down shotgun style. :?

Waylon
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Change directory URL

Post by garvinhicking »

Hi!

For that, you need to install Serendipity into the root. If you don't have any content yet, simply delete /serendipity and your database tables, upload serendipity to / and reinstall.

If you already have content, you can try the short route that might be bundled with manual trouble. Use FTP to move all files of serendipity/ to your / root, then use a tool like phpMyAdmin to browse the serendipity_config DB table and update all *path* config keys to remove /serendipity/ from it. After that you can log into your blog again, and you might need to check your blog entries to adjust /serendipity/ path references to /.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hyejohn
Regular
Posts: 37
Joined: Mon Jun 22, 2009 4:04 pm
Location: Michigan, USA
Contact:

Re: Change directory URL

Post by hyejohn »

It might be worth noting that installation by "unzipping" the s9y package in your root may still create a serendipity/ folder where all the files are then placed. If that happens, move all those files back to the root BEFORE doing anything else. (This happens to me when I use the zip file supplied here. However, I've created my own zip file now, with my customized files, that doesn't do that.)

The alternative is unzipping the package on your local machine and then FTPing the files to your host - I don't recommend that, as it may take some time...
~John
That Photographer guy in Michigan
denijane
Posts: 2
Joined: Mon Nov 23, 2009 6:14 pm
Location: Bulgaria
Contact:

Re: Change directory URL

Post by denijane »

Hi all, I'm a brand new user, but because it was so hard for me to do the change of URL, I decided to post how I did it in case I forget and have to do it again :lol:
So (assuming you have already set up you blog and everything is working and you only want to change the directory), do:
1. Copy /serendipity directory, to whatever name you want it to have, in my case
http://tothefuturewithlove.net/after_the_pink_goat , so /after_the_pink_goat
2. Replace $old_path with $new_path in following files (in my case replace "serendipity/" with "after_the_pink_goat/)":
config_local.inc.php (../include/tpl/)
create.release.sh (../bundled-libs/)

3. With the help of phpMyAdmin do:
3.1. Export your old database:
In my case, all the options were selected everywhere on the page,export options is set to "sql", the compatibility option was set to "mysql" and everything else was unchanged. Click export.
3.2. Edit the file replacing as above "$old_path" with "$new_path" everywhere. Save
3.3. Create a new database and add a user to it - the same as for the old database would be fine, I guess.
3.3. Import the saved file to a new database - select the file you edited, and set compatibility to "mysql". Hit Import.
4. Go to the new directory, and edit "serendipity_config_local.inc.php" where 'dbName' should be set to the name of the new database.
5. Check the paths in Configuration menu of your admin screen. They should be set to your new directory.
Now it should be working. At least it did for me. :wink:

Sorry if I repeat someone, but google didn't give me an answer how to change the URL and set everything again, so this was my way. Have a great day, everyone!

P.S. Of course, I don't guarantee this is the best or even the right way to do this. It's just the only way I know for now. So use it on your own risk.
Post Reply