Moving wordpress blog to new place and new domain

Another client ask me to move their blog to new vps server, something new in this case is the operating system of their vps server :

OpenSolaris

:-)

Yup, I have little experience in this OS but I still accept the job for $10.

Here’s the steps :

Secure copy with scp

# scp /data2/jails/outside/usr/home/alamster/outside.tar.gz arasyid@72.233.106.191:/home/alamster

Extract the file

#gzip -dc outside.tar.gz | tar xvf -

Edit wp-config.php

#/opt/csw/bin/nano wp-config.php

Edit with suitable content.

Call MySQL

find out where mysql

# ps -eaf | grep mysql

mysql  8107     1   0   Apr 22 ?           5:26 /usr/mysql/5.0/bin/mysqld –user=mysql –datadir=/var/mysql/5.0/data –pid-file

# /usr/mysql/5.0/bin/mysql -uroot -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9005
Server version: 5.0.67 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> drop database demo;
Query OK, 10 rows affected (0.03 sec)

mysql> create database demo;
Query OK, 1 row affected (0.00 sec)

mysql> exit
Bye

Import db

# /usr/mysql/5.0/bin/mysql -uroot -p demo < pctoutside.sql

Search and replace in MYSQL

# /usr/mysql/5.0/bin/mysql -uroot -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9007
Server version: 5.0.67 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> use demo;
Database changed
mysql>

update wp_options set option_value=replace(option_value,’http://outside.demo.com’,'http://www2.demo.com’);

update wp_postmeta set meta_value=replace(meta_value,’http://outside.demo.com’,'http://www2.demo.com’);

update wp_postmeta set meta_value=replace(meta_value,’http://172.88.1.13′,’http://www2.demo.com’);

update wp_posts set post_content=replace(post_content,’http://172.88.1.13′,’http://www2.demo.com’);

update wp_posts set post_content=replace(post_content,’http://outside.demo.com’,'http://www2.demo.com’);

update wp_posts set guid=replace(guid,’http://outside.demo.com’,'http://www2.demo.com’);

update wp_posts set guid=replace(guid,’http://172.88.1.13′,’http://www2.demo.com’);

Finish

all things goes back to normal in new place and new domain.

P.S :  I change the domain for education purpose :-)

Related Reading:

Solaris(TM) Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolarisSolaris(TM) Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris

"The Solaris™Internals volumes are simply the best and most comprehensive treatment of the Solaris (and OpenSolaris) Operatin... Read More >

OpenSolaris Bible (Bible (Wiley))OpenSolaris Bible (Bible (Wiley))After a beginning overview of the history of OpenSolaris, its open-source licensing, and the community development model, this book then goes on to hi... Read More >
Solaris Internals(TM): Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)Solaris Internals(TM): Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)

"The Solaris™Internals volumes are simply the best and most comprehensive treatment of the Solaris (and OpenSolaris) Operating Environment. Any p... Read More >

Pro OpenSolarisPro OpenSolaris

OpenSolaris is a rapidly evolving operating system with roots in Solaris 10, suitable for deployment on laptops, desktop workstations, storage appl... Read More >

Thanks for reading, if you think this post help you please consider to buy me a beer

Search Terms :

  • wordpress wamp transfer error
  • wordpress update guid
  • transfer wordpress wamp to hodt server
  • update guid wordpress domain
  • wordpress update wp_posts
  • wordpress moving domain mysql replace
  • UPDATE wp_posts SET guid = REPLACE
  • moving wordpress from localhost to server
  • update wp_post guid
  • update wp_post guid localhost
  • update mysql wordpress local online
  • update wp_post http://
  • UPDATE wp_posts SET guid
  • place wordpress on domain
  • transferring wordpress to vps
  • transferring Wordpress to drupal feeds
  • place wordpress to new domain
  • problem with guid wordpress import
  • replace wp_post search
  • SET guid = replace
    • Share/Bookmark
    Step By Step

    If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

    Comments

    One Response to “Moving wordpress blog to new place and new domain”