Build your own blog under Linux (wordpress installation)

Source: Internet
Author: User
Tags php language php and mysql install wordpress phpmyadmin

Transferred from: http://www.cnblogs.com/xiaofengkang/archive/2011/11/16/2251608.html

About WordPress

WordPress is an open source, free blog (blog, weblog) engine developed using the PHP language and MySQL database, and users can build their own blogs on servers that support PHP and MySQL databases. WordPress is a very powerful blog system, many plugins, easy to expand functionality. Installation and use are very convenient. At present, WordPress has become the 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 program, the goal is aesthetics, WEB standards and ease of integration. It is based on the GPL license agreement and is completely free). :

http://wordpress.org/download/

2. Then install the necessary components of WordPress:

1) Install Apache server:

sudo apt-get install apache2

Open in Browser after installation: http://localhost/or http://127.0.0.1

If it works! appears, that proves OK.

2) Install PHP Service:

sudo apt-get install php5

Test:

Open Gksudo gedit/var/www/testphp.php

Then randomly enter something (I typed in kh) and save it.

Then enter http://127.0.0.1/testphp.php or http://localhost/testphp.php in the browser

If it shows what you're typing, it's a success.

3) Restart Apache server

Sudo/etc/init.d/apache2 restart

At this point the browser can parse the PHP file correctly.

4) Install the MySQL service:

sudo apt-get install Mysql-server

sudo apt-get install Mysql-admin

sudo apt-get install mysql-client

Prompt for the password of the database root user during installation

3. Create a new MySQL database for WordPress:

To open MySQL Manager under Terminal:

$mysql-U root-p

To create a new database:

Mysql>create DATABASE WordPress

4. Unzip the tar.gz compression pack of WordPress

$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 name of the database (such as WordPress here), user name (such as root), password (such as the password you typed when installing MySQL).

5. Copy the WordPress folder to the/var/www directory:

sudo cp-a./wordpress/var/www

At this point in the browser to access the http://localhost/wordpress/wp-admin/install.php, you will find the above described garbled. Let's first use phpMyAdmin to see what this garbled is all about.

6. Install phpMyAdmin:

sudo apt-get install phpMyAdmin

At this point the phpMyAdmin folder is installed under/usr/share/phpmyadmin, in order to be able to access the phpMyAdmin in the browser, you need to make a soft connection to the folder under/var/www:

Go to the/var/www folder and perform the following actions in this directory:

sudo ln-s/usr/share/phpmyadmin

When you type http://localhost/phpmyadmin in the browser, you see an error such as the following:

Cannot load MySQL extension. Please check your PHP configuration.

This is actually the above-mentioned garbled error.

Fortunately, phpMyAdmin also gives a solution to the problem:

7. So it is 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 the installation is complete:

Sudo/etc/init.d/apache2 restart

Sudo/etc/init.d/mysql restart

Then you can access the http://localhost/wordpress/wp-admin/install.php and install WordPress normally.

Build your own blog under Linux (wordpress installation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.