In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method of building WordPress on Ubuntu16.04. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Build WordPress by Ubuntu16.04
Install Apache
Installation
Apt-get install apache2
View statu
Service apache2 restart/status/start/stop
Turn off firewall port 80 limit
Ufw allow 80
So is port 3306 of the back MySQL database.
Test:
Visit the IP of http://Ubuntu and It Works appears! Web page
Install MySQL
Installation
Apt-get install mysql-server mysql-client
test
Mysql-u root-p
View statu
Service mysql retart/status/start/stop
Turn off firewall port 3306 limit
Ufw allow 3306
Install PHP
Installation
Apt-get install php7.0 apt-get install libapache2-mod-php7.0 apt-get install php7.0-mysql
Restart the service
Service apache2 restart service mysql restart
test
Vim / var/www/html/phpinfo.php
It is written in the file:
Browser access: http:// ubuntu address / phpinfo.php, PHP Version web page appears
Install phpMyAdmin
Sudo apt-get install phpmyadmin
During installation: select apache2,enter in the space to determine, next configure the database and enter the password.
Create a phpMyAdmin shortcut
Sudo ln-s / usr/share/phpmyadmin / var/www/html
Enable the Apache mod_rewrite module, which will be used later when you modify the wordpress link
Sudo a2enmod rewrite
Restart the service
Service php7.0-fpm restart
The prompt service was not found? Leave it alone.
Service apache2 restart
Browser access: http:// ubuntu address / phpmyadmin
Configure Apache
Vim / etc/apache2/apache2.conf
Add:
AddType application/x-httpd-php .php .htm .html AddDefaultCharset UTF-8
Restart the Apache service
Service apache2 restart
Install ufw Firewall
Sudo apt-get install ufw
Initialize the database
Sudo mysql-u root-p Enter Password:... Mysql > CREATE DATABASE wordpressdb; mysql > CREATE USER wordpressuser@localhost IDENTIFIED BY 'wordpresspassword'; mysql > GRANT ALL PRIVILEGES ON wordpressdb.* TO wordpressuser@localhost; mysql > FLUSH PRIVILEGES; mysql > exit
Restart the service
Sudo service apache2 restart sudo service mysql restart
Download and configure WordPress
Mkdir temp cd temp
English version
Wget http://wordpress.org/wordpress-4.x.tar.gz
Chinese version
Wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz
Take the English version as an example. If you want to install the Chinese version, you can replace the file name with the Chinese version.
Tar zxf wordpress-4.x.tar.gz-C / var/www/html/ mkdir-p / var/www/html/wordpress/wp-content/uploads
There is no need to do the following in Chinese version:
Key change directory permissions to www-data www-data
Sudo chown-R www-data. Www-data / var/www/html/wordpress sudo chmod-R 755 / var/www/html/wordpress sudo chown-R: www-data / var/www/html/wordpress/wp-content/uploads
Configure wp-config.php
Cd / var/www/html/wordpress/ cp wp-config-sample.php wp-config.php vim wp-config.php / / define ('DB_NAME',' wordpressdb'); / define ('DB_USER',' wordpressuser'); / / define ('DB_PASSWORD',' wordpresspassword')
The Chinese version operates in accordance with its own readme.html, or:
Configure wp-config.php
Cd / var/www/html/wordpress/
Cp wp-config-sample.php wp-config.php
Vim wp-config.php
Define ('DB_NAME',' wordpressdb'); / * MySQL database username / define ('DB_USER',' wordpressuser'); / * MySQL database password / define ('DB_PASSWORD',' wordpresspassword')
Access wordpress installation
Question:
1. Wordpressuser password error (using password yes) may occur
Log in as root user:
Set password for user@localhost = password ("your password")
two。
This is the end of this article on "Ubuntu16.04 's method of building WordPress". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.