existing website: 800-language.info
new website: 800-language-example.info
existing database: 800LanguageTest
new database: 800LanguageTest2
1) copy existing directory to new directory:
cp -r -v ./800-language.info/www/
./800-language-example.info/
;
2) copy existing database into new database (be sure the new database is EMPTY):
mysqldump
—host=localhost
—user=800LanguageTest
—password=XXXXX
800LanguageTest
| sed -e ‘s/800-language.info/800-language-example.info/g’
| mysql
—host=localhost
—user=800LanguageTest2
—password=XXXXXX
800LanguageTest2
;
3) edit wp-config.php file with new database and website:
mv wp-config.php wp-config.phpSAVED ;
sed -e
‘s/800LanguageTest/&2/;s/800-language.info/800-language-example.info/;’
< wp-config.phpSAVED
> wp-config.php
4) look for existing OLD domain names:
find . -print -exec grep 800-language.info {} \;
5) use something like this to change the results from the previous step:
sed -i -e ‘s/800-language.info/800-language-example.info/g’ \
./www/wp-content/uploads/weaver-subthemes/style-weaver.css \
./www/wp-content/blogs.dir/2/files/weaver-subthemes/style-weaver.css \
./www/wp-content/blogs.dir/3/files/weaver-subthemes/style-weaver.css \
./www/wp-content/blogs.dir/4/files/weaver-subthemes/style-weaver.css ;