Build a WordPress blog based on Apache-php-mysql under Debian

Source: Internet
Author: User
Tags apache php install php php and mysql phpinfo web hosting wordpress database wordpress blog

WordPress is a popular blog building framework, for people who will not html,css and JS provide a convenient way to build a blog. I am here in my notebook to build a WordPress blog, here the detailed construction process to write out.

My system information is as follows:

The specific procedure is described below.

1. Installing the APACHE2 server

Where Apache2-doc is the Apache server description and configuration file, LIBAPACHE2-MOD-PHP5 is the Apache PHP module library file.


After the installation is successful, restart the apache2 server,

At this point in the browser address bar input http://localhost, you will see the following page, prompting US apache2 server has been installed successfully.

2. Configuration information about the APACHE2:

The configuration file directory for A.apache2 is/etc/apache2. Under Debian, the configuration file is split into several subfolders under the directory. You can look at the files in this directory:

Where apache2.conf is the master profile, and the ports.conf file is used to configure the listener port for the server. In addition, there is one. conf-enabled file in the mod-enabled and sites-enabled and conf sub-directories, Detailed configuration instructions can be seen in the corresponding instructions.

B.apache2 installation creates a user called Www-data, and all Apache-related processes are initiated by that user. When you can access localhost in your browser, use the top command to view:

The 5th record in the Apache2 server is the process overhead.

C.apache2 's default Web page and script directory is/var/www/html, and the pages stored in the directory (except the index page) can be accessed through http://localhost/filename, as there is a aboutme.html in the directory. , you can enter http://localhost/aboutme.html access in your browser.

3. Install PHP:

Where Php5-mysql is the interface between PHP and MySQL database, this package must be installed in order to use MySQL database.

After the installation is complete, you can check that the installation of PHP is successful by doing the following:

A. In the/var/www/html directory, write the following file phpinfo.php:

<?php phpinfo ();?>

Then visit the page in the browser: http://localhost/phpinfo.php, if the following page appears, the PHP installation has been successful.

Pull down the page to the right of the scroll bar, you can see the following is the PHP support of the various modules and components. It looks pretty much.

4. Install MySQL:

After the installation is complete, refresh just the Phpinfo page, pull down to the middle position, you can see the MySQL and mysqli, the MSYQL has been installed successfully.

5. Download the wordpress compressed file:

Access the http://cn.wordpress.org as shown in. There is a compressed package in the middle of the right to download, click to download.

You can also copy the link address, download with wget (feel like using wget download faster):


Unzip the file after downloading:

Unzip the file in the WordPress folder, you can look inside the content:

You can see that most of the files or folders that start with WP Save the script that configures the blog and the page frame that is presented to the visitor, while other information is stored in the database.

Because our default Web hosting directory is/var/www/html, so to move the files in this folder to this directory to take effect, so do the following move operation:

Mv-r wordpress/var/www/html

This will replace the original HTML directory with the WordPress directory.

Now open the http://localhost in the browser, you will see the page to start the WordPress configuration:


Then follow the steps to create the appropriate WordPress database in MySQL, the entire blog even if the building is complete!

Here is the blog I built (casually copied from the internet ...):

(-end-)




Build a WordPress blog based on Apache-php-mysql under Debian

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.