WordPress Introduction
WordPress is a type of use PHPLanguage andMySQLOpen-source and free database developmentBlog(Blog,WangzhiYou can create your own blog on servers that support PHP and MySQL databases.WordPress is very powerful.Blog system, A large number of plug-ins, easy to expand functions. Installation and use are very convenient. Currently, WordPress has become a mainstream blog building platform.
Now we start to build our own blog:
1. First, you need to download WordPress (WordPress is currently the most popular PHP Blog)ProgramThe goal is to unify aesthetics, web standards, and usability. It is based on the GPL license agreement and is completely free of charge ). :
Http://wordpress.org/download/
2. Install the required components of WordPress:
1)Install the Apache server:
Sudo apt-Get install apache2
After installation, open http: // localhost/or http: // 127.0.0.1 in the browser.
If it works appears! That proves OK.
2) install the PHP service:
Sudo apt-Get install PhP5
Test:
Open gksudo gedit/var/www/testphp. php
Then enter something (the input is KH) and save it.
Enter http: // 127.0.0.1/testphp. php or http: // localhost/testphp. php in the browser.
The input is successful if it is displayed.
3) restart the Apache server
Sudo/etc/init. d/apache2 restart
In this case, the browser can correctly parse the PHP file.
4) install the MySQL service:
Sudo apt-Get install mysql-Server
Sudo apt-Get install mysql-Admin
Sudo apt-Get install mysql-Client
During installation, the system prompts you to enter the password of the root user of the database.
3. Create a MySQL database for WordPress:
Open MySQL manager in the terminal:
$ Mysql-u root-P
Create a new database:
Mysql> Create Database WordPress
4.decompress the wordpresstar.gz compressed package
$ Sudo tar-zxvf wordpress-3.2.1.tar.gz
Get the WordPress folder, and then edit the wp-config.php file as required, mainly to provide the database name (such as WordPress here), user name (such as root ), password (for example, the password entered during MySQL installation ).
5.Copy the WordPress folder to the/var/WWW directory:
Sudo CP-A./WordPress/var/WWW
Access http: // localhost/WordPress/WP-admin/install. php In the browser, and the garbled characters described above are displayed. WeFirst, use phpMyAdmin to check what the Garbled text is.
6. Install phpMyAdmin:
Sudo apt-Get install phpMyAdmin
The phpMyAdmin folder is installed under/usr/share/phpMyAdmin,To access phpMyAdmin in a browser, you need to make a soft connection under/var/WWW to this folder:
Go to the/var/WWW folder and perform the following operations under the directory:
Sudo ln-S/usr/share/phpMyAdmin
Enter http: // localhost/phpMyAdmin in the browser., The following error occurs:
Cannot load MySQL extension. Please check your PHP configuration.
This is actually the error mentioned above.
Fortunately,PhpMyAdmin also provides the solution to this problem:
7. This makes it clear that we can install the PHP-mysql package:
Sudo apt-Get install php-mdb2-driver-mysql
8. Do not forget to restart Apache and MySQL after installation:
Sudo/etc/init. d/apache2 restart
Sudo/etc/init. d/MySQL restart
Then you can access http: // localhost/WordPress/WP-admin/install. php and install Wordpress normally.