Install and configure WordPress

Source: Internet
Author: User
Tags install wordpress name database

I have finally set up in Ubuntu over a weekend. Here I will share some immature experiences.


Install the following software before installing WordPress:

1. apache2. Needless to say, there is no HTTP server without Apache.

Apt-Get install apache2

2. PhP5 and Wordpress are written in PHP.

Apt-Get install libapache2-mod-php5 PhP5

3. MySQL and Wordpress databases based on MySQL

Apt-Get install mysql-server-5.0 for MySQL-common mysql-Admin php5-mysql

4. Additional items, such as phpMyAdmin, are used to facilitate MySQL management, such as unzip, and are used to decompress the zip package.

In most cases, you only need to use apt-Get install to install the above software.


/Etc/init. d/apache2 restart

To restart the Apache server. Basically, the above services are available.

Apache Mod Loading

You can use


To view the loaded Apache Mod,



To view the installed but not loaded modules.

If it is not loaded, you can use a2enmod to load it. For example, load the PHP module.

A2enmod PhP5

After loading, restart Apache.

PhpMyAdmin and MySQL Configuration

Note that when MySQL is just installed, the password is blank, while phpMyAdmin does not allow empty passwords. Therefore, the conflict arises, that is, you cannot directly use phpMyAdmin to manage the MySQL server for the first time.


Configure phpMyAdmin

/Etc/PHPmyAdmin/config. Inc. php

Find and cancel the comments before calling allownopassword = true.

After logging on, change the password again. To ensure security, remember to repeat this line again.

Create a database for WordPress in phpMyAdmin. The default WordPress name is the WordPress name database, and the table is created starting with WP _ in the database.

Install Wordpress

It's no longer easy to install Wordpress. You can directly install one with APT-get, and then link/share/Wordpress to the/var/WWW directory through ln. However, this is generally an English version, and the version is older.

Here, I use callback.

SSH file transfer:


Apt-Get install lrzsz

Install the RZ and Sz commands.

Use securecrt. After logon, use RZ to transfer files to the server, and Sz to transfer files from the server to the local. (My documents exist by default)

Wget download:

This is simpler,

Apt-Get install wget

Then wget file_link can directly specify the file to the server.

You need to configure the FTP server for FTP. Whatever method is used to put ghost blog (the main directory of Apache), you can directly put all the content under the WWW directory. Otherwise, you can put it under/var/www/blog.


Chmod-r 777/var/www/

Modify permissions (the above operations are not safe enough)

You can also try

Chown-r www-data: www-data/var/WWW

To modify the group and user to which the file belongs (I have not tried this operation)

After decompression, the WordPress directory does not existWp-config.php configuration file, one way is to directly change to a wp-config-sample.php with a wp-config.php, see this document.

In fact, you can directly access the WordPress address using a browser at this time, and you will be able to automatically install the configuration page, such:

This is very simple. You can configure the MySQL database name, user name, password, and other information, WordPress user name, and password.

Then, log on to the WordPress Management page.

It indicates that the installation is successful. Go to the address you configured to check the effect. WordPress creates a blog post and a page by default.

Configuration and beautification

The installation of WordPress is simple and time-consuming, but in fact, in order to make log work normally, I spent almost a whole weekend, because WordPress is powerful, however, it is strong in configurability, so I spent a lot of time finding appropriate themes, plug-ins, and so on for reasonable matching and better results. (At present, I really don't want to spend too much time on Blog performance ~~~ In fact, what I like most is the possible theme, but it seems that there is no place to find it ...)


I like very much, so I found the topic of cool shell, whose name is inove.

In addition, the feed configuration is included in the topic options of the inove topic, and an RSS button that matches the habits of Chinese people is also displayed on the page.

Google Analytics code input address is also included, which is very convenient.


Cool shell introduced the plug-ins used by his blog selflessly. Because of the similar blog type, he tried several plug-ins he listed to save time:

WhereAkismetBecause there are not many users, they are not used yet.

All in one Seo packI don't know what to use, but I don't see any obvious results.

Google XML sitemapsNot interested.

WP super Cache.

Syntaxhighlighter evolved, Installed, and not used ......

However, the following plug-ins are useful:

Faster image insert-Batch image insertion plug-in, which is very useful.

WP-postratings-. I don't care whether Ie can view the scoring plug-in. Does my readers use IE?

After the plug-in is enabled and used, some configuration is required.

On the single page, insert

<? PHP if (function_exists ('the _ ratings ') {the_ratings () ;}?>


<? PHP Include ('templates/comments. php');?>

Before, that is, before the comment.

In the index page configuration file, insert

<Div id = "pagenavi">

Before, that is, before page browsing.

You can also grasp this.

Automatic Log truncation-the Chinese version of the plug-in that automatically truncates log text. After using this plug-in, you do not need to add the more tab to write the log for text truncation. The UTF-8 pattern interception, Chinese no garbled. This plug-in is required to display only part of the content of the article on the homepage of coolshell. The actual usage is good.



Finally, I used


And then use the Domain Name

Http:// steering support, as a permanent feed address.



Simply put,

Font-family:,, Arial, verdana, Arial, Serif;

Font-size can be modified by yourself. Generally, the ordinary 12px is changed to 14px, and other values can be amplified as appropriate. The reason is that the subject is in English, while the English is generally 12px, and the Chinese is 12px, which is more appropriate to use 14px.


It's hard to do so many things. If you don't back up the data, it's hard:
Tar czvf www.tar/var/WWW

Then, use SZ to upload and save it locally.

The last look is what this blog looks like ~~~~

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: 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.