How to copy blog to another domain

Having trouble installing serendipity?
Post Reply
meralda-art
Regular
Posts: 16
Joined: Sat Apr 28, 2007 10:40 pm
Contact:

How to copy blog to another domain

Post by meralda-art »

I try to copy the blog to another domain.

I copied /home/user/public_html to the other domain
restored the MYSQL-DB with a shell

mysql -uadmin -p123 weblog < /home/user/install/weblog.sql

Then I edited serendipity_config_local.inc.php

Now I have a path error.

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/user/public_html/templates/my_template/404.tpl) is not within the allowed path(s): (/home/cmstrial/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cmstrial/public_html/cms/include/functions_config.inc.php on line 277

It looks like there is a variable for the path. The old path is shown in the error message with the new domain.

Where is serendipityPath defined?
meralda-art
Regular
Posts: 16
Joined: Sat Apr 28, 2007 10:40 pm
Contact:

Post by meralda-art »

There is a field serendipityPath in the table serendipity_config.

Now I have the next error:
Warning: Smarty error: unable to read resource: "404.tpl"

Edit:
I found now http://s9y.org/198.html

Hopefully I can do the necessary changes now.
ju
Regular
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Post by ju »

I have a related problem. I changed the domain of a blog, following these instructions http://s9y.org/198.html . The folder on the filesystem remained the same. Now I can reach the admin-interface, but when I return to my blog, I see the files and folders instead of the index-page. I guess this is more an apache-problem than a serendipity-problem, but I have no clue, what to change.

My vhost looks like this (copied from another vhost-stanza that works with wordpress):

Code: Select all

NameVirtualHost *
<VirtualHost *>
        ServerAdmin jutta@rainbow.or.at
        DocumentRoot /var/www/s9y/
        ServerName www.queer-news.at
        
        <Directory /var/www/sy9/>
                Options +Indexes
                Order allow,deny
                allow from all
        </Directory>

 
        ErrorLog /var/log/apache2/error.log
        LogLevel info

        CustomLog /var/log/apache2/queer-news-access.log combined
        ServerSignature EMail

</VirtualHost>
When I click the "index.php" file in the folder, I get the formatted page, but without pictures.

//update: found one mistake myself ;)
I also had to change the path in the .htaccess file (from DirectoryIndex /s9y/index.php to DirecotryIndex /index.php). Now I get the index-page (and not the folder). But there remains one problem: The pictures are missing. In the meantime I have found the reason, the links contain the old path <a class="serendipity_image_link" href="/s9y/uploads/families.jpg">
Is there an easy way of updating the path? (As it is just a test-blog with two dozens of posts and a handful of pictures I could just edit it, but what, if I move a blog with some thousand posts?)
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi there

what I generally do when I move serendipity is: do a sql dump of the database, open it in BBedit - or what ever text editor you use; find and replace the old path for the new path; save the sql file. Then you can just reimport the new sql file to the database.

HTH

DAve
ju
Regular
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Post by ju »

> Then you can just reimport the new sql file to the database.

Thank you. I also thought about this solution but am still unsure about some details: I wanted only to dump and reimport the one table concerned (serendipity_entries). I guess, that I will have to delete the original table before importing the corrected one and am just reading the mysql-manual to finde the correct syntax.
ju
Regular
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Post by ju »

update: a friend told me an easier possibility:

Code: Select all

UPDATE sy_entries SET body=REPLACE(body, '/s9y/uploads/', '/uploads/');
It worked perfectly (updating the cached views will be necessary to view the changes soon)
jocuri
Posts: 1
Joined: Mon May 18, 2009 3:05 pm
Contact:

Re: How to copy blog to another domain

Post by jocuri »

thanks for this post,it was very helpful for me too
Post Reply