HTTP://CODEX.WORDPRESS.ORG/ZH-CN: Install WordPress
Introduced
WordPress is your best choice if you want to create your own website quickly, easily, and for free.
WordPress is a blog platform developed using the PHP language that allows users to build their own websites on servers that support PHP and MySQL databases. WordPress can also be used as a content management system (CMS) to use.
WordPress is a personal blog system, and gradually evolved into a content management system software, which is developed using the PHP language and MySQL database. Users can use their own blogs on servers that support PHP and MySQL databases.
WordPress has a number of third-party developed free templates, easy to use installation methods. But to make a template of your own, you need to have a certain degree of expertise. For example, you should know at least one of the standard universal markup languages, the application of HTML code, CSS, PHP and other related knowledge.
WordPress official support Chinese version, while there are enthusiasts to develop a third-party Chinese language pack, such as Wopus Chinese language pack. WordPress has thousands of plugins and countless theme template styles.
Here is a simple tutorial to install WordPress 4.0 on Ubuntu 14.10.
Preparatory work
The following is based on Ubuntu 14.10, before you start to install WordPress, you need to complete the LAMP service (Linux, Apache, PHP, MYSQL) to configure your personal site.
To install LAMP components:
sudo apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-gd php5-curl libssh2-php
When Apache, PHP, and MySQL are all installed, you can start the WordPress installation tour. The creation of the database and the MySQL user through the database and the creation of the MySQL user, you will start the personal site creation process. You need to set a password for the root user of MySQL. Log mysql -u root -p
in to MYSQL: After successful authentication you need to create a WordPress database: CREATE DATABASE wordpress;
Here I have the name of the database WordPress, can be defined by themselves. But remember the database name, which will be used later in the installation. Now you need to create a database administrator:
CREATE USER [email protected] IDENTIFIED BY ‘wordpresspassword‘;
Next, you need to assign administrative permissions to the administrator:
GRANT ALL PRIVILEGES ON wordpress.* TO [email protected];
You need to refresh the permissions information to activate the user rights:
FLUSH PRIVILEGES;exit
Configuration of PHP and Apache
Next, you need to configure PHP and Apache. Open Apache PHP configuration file with sudo privileges:
sudo nano /etc/php5/apache2/php.ini
Search commands expose_php and allow_url_fopen to turn them off:
. . .expose_php = Off. . .allow_url_fopen = Off. . .
Save and close after the change is complete. Next, you need to enable the Apahce override feature (rewrite). To enable the Mod_rewrite module command:
sudo a2enmod rewrite
The module is enabled after restarting the Apache service. However, you need to enable the use of the. htaccess before restarting the Apache service. So, open the file that contains the actual override and will be included by default during WordPress installation.
sudo nano /etc/apache2/sites-enabled/000-default.conf
In this file, you must add a mask that redirects to the Web root directory. You may also need to ServerName the command to point to your domain name and use the ServerAdmin command to point to a valid email address:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common</VirtualHost>
After completing the above steps, restart the Apache service for the configuration to take effect.
sudo service apache2 restart
Download and install WordPress
Now that the system is ready, we can start the installation of WordPress! Go back to your server, switch to your temp directory and use wget to download WordPress
cd /tmp
wget http://wordpress.org/latest.tar.gz
Unzip when download is complete:
tar xzvf wordpress*
Now, to copy the extracted directory to your web directory, it is recommended to use Rsync to securely copy files:
cd wordpress*sudo rsync -avz . /var/www/html
Now you can go to the web directory to check the copied files:
cd /var/www/htmlls -lsa
Make sure that the WordPress directory file can be written, while, to Www-data user, Www-data group run (user, belong to group customizable):
chown www-data:www-data -R /var/www/html/
Configure WordPress
Edit WordPress config.php file,
cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.phpvi /var/www/html/wp-config.php
Locate and modify the database name, database user name, MySQL root password:
[...]// ** MySQL settings - You can get this info from your web host ** ///** The name of the database for WordPress */define(‘DB_NAME‘, ‘wordpress‘);/** MySQL database username */define(‘DB_USER‘, ‘wordpressadmin‘);/** MySQL database password */define(‘DB_PASSWORD‘, ‘wordpresspassword‘);/** MySQL hostname */define(‘DB_HOST‘, ‘localhost‘);[...]
After completing the above configuration, restart the Apache service:
service apache2 restart
Install WordPress
With the above operation, the file is ready and the software is configured to complete. The installation of WordPress can be done via the Web interface. To access your domain name or IP address in your browser:
http://server_domain_name_or_IP
You will see the initial installation interface of WordPress, you will create an administrator account:
Complete the site information and create your admin account. After filling out, click the Install WordPress button to continue. WordPress will confirm your installation information and then ask you to log in with the account you just created:
Click Log in to fill in the account information:
You can access your site through the domain name or IP address!
Original link: http://www.unixmen.com/install-wordpress-ubuntu-14-10/
How do I install WordPress on Ubuntu 14.10?