Last update at :2024-05-11,Edit by888u
For those who have purchased a VPS, it is not easy to create a web environment and install WordPress. The following is a detailed tutorial. Prerequisite: Operate under Centos/debian system and SSH (root user). OneinStack is recommended: lnmp, lamp, lnmpa one-click installation package. Next, install Nginx, PHP 7.0, Mysql 5.6
1. Install lnmp (using OneinStack) 1. Download OneinStack and install it
yum -y install wget screen wget http://mirrors.linuxeye.com/lnmp-full.tar.gz tar xzf lnmp-full.tar.gz cd lnmp screen -S lnmp ./install.sh2. Port, it is recommended to default and just press Enter
3. Turn on the firewall
4. Install web environment
5. Install Nginx
6. Do not install Apache (just install either Apache or Nginx)
7. Install Mysql 5.6 and set a password
8. Select the default for database installation
9. Install PHP 7.0
10. Install Zend OPcache
11. ionCube, ImageMagick or GraphicsMagick, Pure-FTPd, you can install it or not, it’s up to you. phpMyAdmin is recommended to install. redis, memcached, HHVM are not installed.
Wait patiently for the installation to complete.
12. Restart
13. Install Let’s Encrypt client to enable the website to support SSL. Reconnect to SSH and install Let’s Encrypt client
2. The prerequisite for installing wordpress is that the IP has been bound to the domain name. Assume that the domain name to be built is wptest.we.com
1. Create the site under SSH or in the lnmp directory
./vhost.shInstall as shown below
The website is now set up. Your website directory is under /data/wwwroot/, and the domain name is the directory.
2. Create a database and access your host IP with a browser. The following will appear:
This file is under /data/wwwroot/default and can be changed at will.
b. Visit http://your host IP/phpMyAdmin/, log in, username root, and the password is the password created in the first part
c. Click New in the upper left corner to create a database
Enter the database name, whatever you want, as long as it is easy to remember
3. Set up wordpressa and enter the directory where you want to build wordpress, such as /data/wwwroot/wptest.we.com
cd /data/wwwroot/wptest.us.comb. Download wordpress4.8.1 Chinese version
wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.zipUnzip
unzip wordpress-4.8.1-zh_CN.zipMove all files to the website root directory
mv wordpress/* /data/wwwroot/wptest.us.comc. Set the database rename configuration file name
mv wp-config-sample.php wp-config.phpEdit the configuration file wp-config.php
vi wp-config.phpPress i to edit, move the cursor with the arrow keys, and edit the name, username, and password of the WordPress database
Then press Esc to exit editing, press Shift + z (2 times), and save.
d. In the browser, enter the domain name to install, such as wptest.we.com, and fill it in according to your needs
In this way, a wordpress site is built. In the same way, a typecho or PHP site can be built.
Recommended site searches: US website space, US multi-IP site group vps, domain name registration, Hong Kong host hosting, IP reverse domain name check, cloud server rental, overseas virtual host, telecom host rental, website registration price, registered domain name query,
发表评论