1. Purchase and install the system
The purchase does not say ha, English is not good oneself searches the tutorial. Then the installation system
Linode System Installation:
After the purchase is completed login, go to find the purchased VPS, click on Dashboard (Control Panel) to enter after clicking on the Rebuild (Rebuild System) button on the panel above.
In the open page, click Deploying using Stackscripts (Rebuild the system using batch script) below to find the WordPress, generally very front, click to enter.
The front is the MySQL root password and database name, this needless to say, you can enter in accordance with the requirements, remember to enter the password to write down, do not forget to get back also need time ah.
The following image is chosen based on what system you are familiar with. Personal comparison like CenOS7, the following configuration method is also in CentOS 7 For example, if you are familiar with other systems, can be found in the corresponding system file;
Rootpassword is the console of the Super Administrator password, this input a password, you can remember. Other options remain the default. OK, wait a few minutes for the automatic installation to complete.
2. Upload the wordpress file to the new space.
If the administrator himself can use xftp directly with the console root account and password to upload files, if it is for customers, in order to prevent the system files are deleted, you can configure an FTP, detailed configuration of the FTP method you can Baidu "Linux how to configure FTP." After linking, upload and unzip the wp-content file of the original space to overwrite the current Wp-content folder. Then set the permissions on the console to 777
#chmod-R 777/var/www/yoursite/public_html/wpcontent
Then the database information in the wp-config.php file is modified, note the prefix if there are changes, here to correspond, it is best to copy the previous site's wp-config.php file, and then modify the database account number, password, database name can be. If you install WP Super CACHE, you also need to set the file 777 permissions, the same way as above.
3. Import the database file.
Import method One: In order to facilitate the database management, you can directly upload phpMyAdmin to the Web site root directory, the connection mode to the cookie authentication, is in phpMyAdmin root directory config.inc.php
$cfg [' Servers '] [$i
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
Then access the phpMyAdmin directory to upload the database files, more than the size can use the server file, details Baidu. After uploading, the database that was backed up by the previous website can be imported to complete.
Import here have to note:
The character set encoding of the new database is unified with the previous database and is now generally used UTF8_GENERAL_CI
Import method Two: Alternatively, you can also import from the console, and now upload the backed-up database files to the space-specific directory, and then execute the import command. It is generally recommended to use the source command, because it is possible to set the database encoding format, does not appear garbled, otherwise it is easy to garbled, the steps are as follows:
MySQL -u dbadmin-p use myblog;set names UTF8 ; # Here's the character set root you're going to import the character set of the database one to. Source/home/zhangy/blog/database_bak/myblog.sql;
How to back up the database of the previous Web site, backup can also be performed through phpMyAdmin, of course, can also be performed via console commands
Mysqldump-u dbadmin-p myblog >/home/zhangy/blog/database_bak/myblog.sql
Where Dbadmin is the database user name MyBlog the database name, followed by the path and file name to save the destination file path and name. You will need to enter the password of the database after entering, confirm it after input.
At this point, the MySQL database settings are not completed, because we chose the default WordPress CentOs 7 image also installed by default a mariadb (MySQL Data Security Wizard), need to run once to be able to, Otherwise, it will cause MySQL to run automatically after a period of time. The method is simple, the following three sentences can be executed, after the third sentence, follow the wizard settings.
Systemctl start mariadb. servicesystemctl enable mariadb. servicemysql_secure_installation
4. Setting the site's domain name and pseudo-static
If your VPS needs more than one website, add a vhosts.conf (end of. conf, name yourself) in the console to the/ETC/HTTPD/CONF.D to set up a directory of multiple websites, in the following format:
<virtualhost *:80> ServerAdmin [email protected]-host2.example. COM "/var/www/myblog/public_html" ServerName www. MyBlog. COM aliasname myblog. com " Logs/dummy-host2.example.com-error.log " " Logs/dummy-host2.example.com-access.log " common </VirtualHost>
One of the DocumentRoot and ServerName is required, and several others are optional. If the same site is bound to more than one domain name, it is separated by a space in the aliasname.
Restart Apache after modification, restart command service httpd restart
To support the. htaccess pseudo-Static of the site root, you also need to modify the httpd.conf file in/etc/httpd/conf, adding statements after the Include conf.modules.d/*.conf
LoadModule Rewrite_module modules/mod_rewrite.so
To implement pseudo-static support, you also need to modify the file directories that are allowed to be rewritten, that is, your Web site root directory. Set up your root directory for/var/www, which takes after all <directory xxxx> (note that the previous rule will be overwritten by the following), join
<directory "/var/www" > allowoverride All# open access: Require All granted</Directory>
You can also modify the existing directory directly as shown above.
You can then upload the. htaccess of the original site root directory to the new Web site root to take effect.
Finally, the domain name resolution in the past, all of WordPress moved to Linode all the work completed.
WordPress Move to Linode step analysis