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
2. Then, install PHP7.1
sudo apt-get -y install php7.1 sudo apt-get -y install php7.1-mysql php7.1-fpmInstall Mysql
sudo apt-get -y install mysql-server-5.7
Set the password, OK. At this point, the basic WordPress environment is ready. Deploy WordPressFirst pull the WordPress source code through git:
git clone https://github.com/JellyBool/wordpress.git /var/www/wordpressConfigure MysqlLog in through the following command
mysql:
mysql -u root -pExecute in mysql:
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
Note that the aboveConfigure NginxOpen the configuration file:jellybool
and
laravistare set according to your own needs .
vim /etc/nginx/sites-available/defaultConfigure the following configuration:
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; }Access your domain name, you can perform very famous The
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);Install other php extensions