Use XAMPP + WordPress to build a personal blog locally _ PHP Tutorial

Source: Internet
Author: User
Tags wordpress database
Use XAMPP + WordPress to build a personal blog locally. I. preparations: XAMPP is an Apache release that is easy to install and contains MySQL, PHP, and Perl. XAMPP is indeed very easy to install and use: you only need to download, decompress, and start. 1. preparations:

XAMPP is an Apache release that is easy to install and contains MySQL, PHP, and Perl. XAMPP is indeed very easy to install and use: you only need to download, decompress, and start it.

XAMPP has four versions so far:

(1) applicable to Linux

(2) applicable to Windows

(3) applicable to Mac OS X

(4) applicable to Solaris

XAMPP is free of charge. you only need to download and unzip XAMPP to complete the installation. Here we use the XAMPP version for Windows. You can download the corresponding XAMPP version based on your system.

Http://www.apachefriends.org/zh_cn/xampp.html: XAMPP

WordPress can be used to build a powerful network information publishing platform, but it is more suitable for personalized blogs. For Blog applications, WordPress can save your worries about background technologies and focus on website content.

WrodPress requires support from the following environments:

(1) PHP: 5.2.4 or updated

(2) MySQL: 5.0 or later

(3) Apache mod rewrite module (optional, used to support "fixed link" and "site network)

Of course, XAMPP and WordPress are used here. you do not need to configure PHP and install the MySQl and Apache environments. you only need to install XAMPP to build WrodPress.

WrodPress: https://cn.wordpress.org/

II. environment construction:

After the preparation is complete, we will start to build the environment:

We use the downloaded XAMPP installation package for installation. the installation process is very simple. I will not discuss it in detail here. I believe everyone will install it. After the installation is complete, start the XAMPP program:

For example, the newly installed program shows a red cross in the Service column because no corresponding Service is installed. you can click the Red Cross to install it. After installation, the Red Cross turns green.

Then you can start the Apache and MySQL services.

Note that if you have installed IIS services on your computer, Apache will prompt that port 443 and port 80 are in use because IIS occupies these two ports, what should I do? Click the Config button corresponding to the Apache line:


Click Apache (httpd. conf) to open the Apache configuration file and change 80 in the file to 801 (or the port number is not occupied ).

Click Apache (httpd-ssl.conf) to open the Apache configuration file and change the 443 that appears in the file to 448 (or a port number that is not in use)

Click Start to enable the service. you will find that the service can be enabled normally.
At this point, our environment is basically set up.

III. environment configuration:

The idea behind XAMPP is to provide an easy-to-install release for developers who want to enter the Apache world. To facilitate developers, XAMPP is configured to enable all functions by default.

From the security perspective, the default configuration is not ideal, and the production environment is not secure-do not use XAMPP in such environments.

In the XAMPP program, click the "Admin" button next to the Apache line to enter the configuration.

Here, this article only introduces the [security] configuration. Other information can be learned by yourself.

Click security to go to the http: // localhost: 801/security/index. php page. This page provides a quick overview of the security status after XAMPP is installed .:

Click the link marked in red to perform the security console. you can set MySQL security and XAMPP directory protection. On the page, we set the root user's access password for MySQL. There is also the user and password for accessing the XAMPP directory.

After completing the settings, let's test whether the user password is correct.

(1) first, we will verify the user and password for access to the AMPP directory. Refresh the page and the following page will pop up (because XAMPP directory protection requires the user name and password for access ):

Enter the username and password set above, and click OK. If the access succeeds, the user and password used to access the AMPP directory have taken effect.

(2) next we will verify the MySQL database password.

Click the CD set link on the http: // localhost: 801/xampp/page. if the link appears, the password has taken effect:

We need to change the database password in the file. We can find H: \ xampp \ htdocs \ xampp \ cds. php (this is the test directory in this article, and my friends can modify it based on their own situation ). Find

The default password is null. We changed it to the database password we set earlier. (Note: There are two parts in this file that need to be modified. modify both parts for testing ). Save the modification. then, go back to the previous page and re-open the CD set page. the verification is successful. As follows:

Here, we have verified the user and password for access to the AMPP directory and the MySQL database password.

IV. MySQLDatabase management:

(1) phpMyAdmin is a set of PHP programs that can be used to manage MySQL-server and a single database. it is a convenient management tool for those who are not familiar with MySQL command column instructions.

Enter http: // localhost: 801/phpmyadmin/in the browser to go to the phpMyAdmin management background and manage MySQL. In this article, I will not go into details about how to operate and how to configure it in depth. friends can study it. only by studying, exploring, and operating can we make progress.

(2) after logging on with the previously set MySQL User password, we switch to [database] to create a new database and build WordPress for the following, here we will create a database named WordPress.

V. WrodPressStart:

(1) decompress the downloaded WrodPress file to the directory H: \ xampp \ htdocs (the directory depends on the actual situation ). We have already set up the Apache and MySql environments, so we can access them after completing some WordPress configuration.

(2) There are two ways to configure WordPress: one is to manually modify the file for configuration, and the other is to complete the configuration by the wizard provided by WordPress.

A): Open the wp-config-sample.php file under the \ wordpress folder, which is a sample configuration file provided by WordPress, we can modify the other and save it as a wp-config.php. In this way, the configuration is manually completed. Through this file, we can configure [Database name] [Database User name] [database password] [host] and so on.

B): If you are not familiar with the configuration file, we can configure it through the wizard. Type http: // localhost: 801/wordpress/in the browser. If no configuration is made, WordPress will provide the configuration wizard.

In the Wizard, configure [Database name] [Database User name] [database password] [host]. (note that the database name here is the WordPress database we created earlier. if it is not created, the wizard will prompt you to create a database first .) A database, website information, background logon user, and logon password are generated.

Now, complete the previous work. Next, visit our site:

Foreground: http: // localhost: 801/wordpress/

Background: http: // localhost: 801/wordpress/wp-login.php

XAMPP is an Apache release that is easy to install and contains MySQL, PHP, and Perl. XAMPP is indeed very easy to install and use: just download, decompress, start...

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.