How to install WordPress on Ubuntu 14.10?

Source: Internet
Author: User
Tags apache php valid email address install wordpress wordpress database

How to install WordPress on Ubuntu 14.10?

Introduction

If you want to quickly, easily, and freely create a personal website, WordPress is your best choice.

WordPress is a blog platform developed in PHP. you can build your own website on servers that support PHP and MySQL databases. WordPress can also be used as a Content Management System (CMS.

WordPress is a personal blog system and gradually evolved into a content management system software. It is developed using PHP and MySQL databases. You can use your blog on servers that support PHP and MySQL databases.

WordPress has many free templates developed by third parties, which are easy to install. However, to create your own template, you must have some professional knowledge. For example, you must understand at least the HTML code, CSS, PHP, and other related knowledge of an application under the standard General Markup Language.

WordPress supports the Chinese version and third-party Chinese language packs developed by enthusiasts, such as the wopus Chinese Language Pack. WordPress has thousands of plug-ins and countless theme template styles.

The following is a simple tutorial on installing WordPress 4.0 on Ubuntu 14.10.

Preparations

The following content is based on Ubuntu 14.10. Before installing WordPress, you need to complete the LAMP Service (Linux, Apache, PHP, MYSQL) to configure your personal site.

Install the LAMP component:

Sudo apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-gd php5-curl libssh2-php

When Apache, PHP, and MySQL are installed, you can start the installation of WordPress. You can create databases and MySQL users through databases and MYSQL users. You need to set a password for the root user of MySQL. Log on to MYSQL:
Mysql-u root-p
After successful authentication, you need to create a WordPress database:
Create database wordpress;
Here, I name the database wordpress, which can be defined by myself. But remember the database name, which will be used in subsequent installation. Now, you need to create a database administrator:
Create user wordpressadmin @ localhost identified by 'wordpresspassword ';

Next, you need to assign the management permission to the Administrator:
Grant all privileges on wordpress. * TO wordpressadmin @ localhost;

You need to refresh the permission information to activate the user permission:
Flush privileges;
Exit

Configuration of PHP and Apache

Next, you need to configure PHP and Apache. Open the configuration file of Apache PHP with The sudo permission:
Sudo nano/etc/php5/apache2/php. ini

The search commands expose_php and allow_url_fopen set them to off:
...
Expose_php = Off
...
Allow_url_fopen = Off
...


Save and close the changes. Next, you need to enable the Apahce rewrite function (rewrite ). Run the following command to enable the mod_rewrite module:
Sudo a2enmod rewrite

After the Apache service is restarted, this module is enabled. However, before restarting the Apache service, you must enable. htaccess. Therefore, open the file that contains the actual rewriting and will be included by default during WordPress installation.
Sudo nano/etc/apache2/sites-enabled/000-default.conf

In this file, you must add a shield to redirect to the web root directory. You may also need the ServerName command to point to your domain name, and use the ServerAdmin command to point to a valid Email address:
<VirtualHost *: 80>
ServerAdmin admin@your-domain.com
DocumentRoot/var/www/html/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory/var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
Allow from all
</Directory>
ErrorLog/var/log/apache2/your-domain.com-error_log
CustomLog/var/log/apache2/your-domain.com-access_log common
</VirtualHost>

After completing the preceding steps, restart the Apache service to make the configuration take effect.
Sudo service apache2 restart

Download and install WordPress

Now that the system is ready, we can start installing WordPress! Go back to your server, switch to your temporary directory, and use wget to download WordPress
Cd/tmp
Wget http://wordpress.org/latest.tar.gz

Decompress the downloaded package:
Tar xzvf wordpress *

Now, copy the decompressed directory to your web directory. We recommend that you use rsync to copy files securely:
Cd wordpress *
Sudo rsync-avz./var/www/html

Now you can check the copied files in the web directory:
Cd/var/www/html
Ls-lsa

Make sure that the WordPress directory file is writable. At the same time, run in www-data user and www-data group (user and group can be customized ):
Chown www-data: www-data-R/var/www/html/

Configure WordPress

Edit the WordPress config. php file,
Cp/var/www/html/wp-config-sample.php/var/www/html/wp-config.php
Vi/var/www/html/wp-config.php

Find and modify the database name, database username, and mysql root Password:
[...]
// ** MySQL settings-You can get this info from your web host **//
/** The name of the database for WordPress */
Define ('db _ name', 'wordpress ');
/** MySQL database username */
Define ('db _ user', 'wordpressadmin ');
/** MySQL database password */
Define ('db _ password', 'wordpresspassword ');
/** MySQL hostname */
Define ('db _ host', 'localhost ');
[...]

After completing the preceding configuration, restart the Apache service:
Service apache2 restart

Install WordPress

Through the above operations, the file is ready and the software has been configured. You can install WordPress through the web interface. Access your domain name or IP address in your browser:
Http: // server_domain_name_or_IP

You will see the initial installation interface of WordPress. You will create an Administrator Account:

Complete the site information and create your management account. After entering the information, click the Install WordPress button to continue. WordPress will confirm your installation information and ask you to log on with the account you just created:

Click Log In to enter the account information:

You can access your website through the domain name or IP address!

Configure the LAMP + phpMyAdmin PHP (5.5.9) development environment in Ubuntu 14.04

CentOS 6.5 system installation and configuration LAMP (Apache + PHP5 + MySQL) server environment

Install LAMP in Ubuntu 14.10

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.