How To Move Your Serendipity Blog To A New Server

How To Move Your Serendipity Blog To A New Server




Moving to a new server is never easy or painless no matter how much work a software company (or open source project) has taken to make paths relative and isolate server specific settings. The fine authors of the Serendipity blog engine have done a very good job with these abstractions, but there are a associate of tricks and tips which will help you out if you need to move to a new server and/or a new domain name.

The first thing you need to do is make sure your security on your new server is set up correctly. For my case I had to move about 20 web sites from a shared hosting account (where security was managed for me) to a dedicated hosting account (where I had to implement the security myself). I am not going to elaborate on what I had to do for my security requirements, but for yours you will need to make sure that the appropriate directories have write access from PHP (or more likely the web server that PHP is running under). If you have a shared hosting account you can pretty much assume that this is taken care of for you and the files you upload via FTP will be given write access by apache.

Once your security issues are sorted out you are ready to move your stuff. What I did is I FTP’d all the files from my installation to my local excursion. From there I would be free to modify what is needed. I also produced an export from MySQL using myPHPAdmin. When I produced my export I chose drop database and drop table options, this way my new database was being produced right from scratch. If you are installing to an existing database on your new server clearly you don’t want the drop database option. I also pulled down this generated .sql file to my local box.

Now for the fun, a associate of quick steps and you’ll be ready to start the move.

1. Go into the generated .sql file and do a search for your old path. For example mine was something like /home/a/b/c/jonny/html/serendipity/ then modify all instances of this string to where your new install is going to be. For example, my new install dir is something like /home/mma/public_html/

i.e. search and replace old install path with new install path in MySQL file.

2. If you are changing your table prefixes on your new install (you probably aren’t), then change all these instances. My old was serendipity_mma_ and I decided to keep that, so no changes were necessary.

3. If you are changing your domain name, then make all of those changes. My old domain name was mma.gocurious.com and my new one is http://www.ufcresultslive.com, so I did the search and replace on all of those. Technically I didn’t need to do this step as I am redirecting all traffic from my old domain to my new one anyway, but it’s better to have it changed.

4. You are now finished with the .sql file, save it and remember where it is. You will need to upload and apply it later.

5. We now need to fix your serenendipity_config_local.php file. This is the file in serendipity which contains your database information (name and password), database prefix (serendipity_mma_ in my case) and all the other goodies that serendipity needs to connect to the db. Make sure that these values correspond to your values on your new database. You can now save your serendipity_config_local.php file.

6. You can now upload (probably via FTP or SFTP) your serendipity files to the new server.

7. We need to build your new database. How you do this will be specific to the tools that you have access to. If you are moving to a dedicated great number then you can simply upload the .sql file and apply it via the MySQL command line tools. If you are moving to a new shared great number then the myPHPAdmin import will only manager up to 2 meg. If your db is larger than 2 meg you will need to get a tool known as BigDump. observe that I have not used BigDump myself, but have read that it works quite well. BigDump essentially splits your sql into




leave your comment

Top