How to transfer WordPress to Linode

This post will be put here as a backup, in case the other days I forget how to deal with such problem.

What I got is the first thing I should state here. The answer is a complete backups of the previous wordpress fold and a .sql database file. O.K, let’s begin.

Step 1, go to the name server to point the domain name to my Linode IP address.

Step 2, configure name-based virtual hosts. Create a file in the /etc/apache2/sites-available/ directory for each virtual host that you want to set up. Name each file with the domain for which you want to provide virtual hosting. See the following example configurations for the hypothetical “” domain.


<VirtualHost *:80>
     DocumentRoot /srv/www/
     ErrorLog /srv/www/
     CustomLog /srv/www/ combined

After you’ve set up your virtual hosts, issue the following commands:


This command symbolically links your virtual host file from sites-available to the sites-enabled directory. Finally, before you can access your sites you must reload Apache with the following command:

/etc/init.d/apache2 reload

Step 3,change the config file to suit your current environment, the config file locates /srv/www/

Step 4, import the .sql file to your mysql database. Issue the following commands:

mysql -u username -p database_name < file.sql

The username and database_name should be change to the other names according to the wp-config.php file.

For further information, pleas check Manage Web Content with WordPress and LAMP Server on Ubuntu 10.04 (Lucid).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>