Software version description:
Ubuntu:
16.04 LTS
;WordPress:
4.7 zh-CN
##Applicable people: JuniorInstall PHP7.1Getting started with PHP Readers
and the majority of
designerswho want to have their own sites!
1. First add PPA
sudo apt-get update sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y sudo apt-get update
Copy after login
2. Then, install PHP7.1
sudo apt-get -y install php7.1 sudo apt-get -y install php7.1-mysql php7.1-fpm
Copy after login
sudo apt-get -y install mysql-server-5.7
Copy after login
Set the password, OK. At this point, the basic WordPress environment is ready. Deploy WordPressFirst pull the WordPress source code through git:
sudo apt-get -y install mysql-server-5.7
Copy after login
git clone https://github.com/JellyBool/wordpress.git /var/www/wordpress
Copy after login
mysql:
mysql -u root -p
Copy after login
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE USER 'jellybool' IDENTIFIED BY 'laravist'; GRANT ALL PRIVILEGES ON wordpress.* TO 'jellybool'; quit
Copy after login
Note that the aboveConfigure NginxOpen the configuration file:jellybool
and
laravistare set according to your own needs .
vim /etc/nginx/sites-available/default
Copy after login
root /var/www/wordpress; index index.php index.html index.htm index.nginx-debian.html; # 注意我们添加了 index.php location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
Copy after login
WordPress five-minute installation process! After installation is complete, you have a WordPress site!
wp-config.php file:
define('FS_METHOD', 'direct'); define('FS_CHMOD_DIR', 0777); define('FS_CHMOD_FILE', 0777);
Copy after login
sudo apt install -y php7.1-gd php7.1-mbstring php7.1-xmlrpc
Copy after login
At this point, the work is done. sudo apt install -y php7.1-gd php7.1-mbstring php7.1-xmlrpc
Copy after login