Tuesday, September 15, 2015

Howto Install WordPress 4 on Centos Linux 6

WordPress in a PHP based content management system licensed under GPL v2. Since it has been around for a long time, there are many forums, blogs and video to help users and developers.

  1. Create web pages without needing to know HTML
  2. Provide blog tools
  3. Themes to quickly create different look and feel
  4. Plugins to extend its functionalities
  5. Mobile ready site
  6. Provide multiple authors to manage their own contents.

WordPress 4.3 has just been released and here is a guide to install on Centos 6.4

Pre-installation recommendation
PHP 5.4 (works on 5.3.3)
MySQL 5.5 (works on 5.1)
mod_rewrite in Apache module
Bind-utils (works on 9.8.2)

Step 1: Obtain WordPress

Open a terminal and download the WordPress installation file.

$ wget --no-check-certificate https://wordpress.org/latest.tar.gz
$ tar xvzf latest.tar.gz
$ ls wordpress

Copy the whole folder to the web server directory. Example if the web server runs with permission for user apache.
$ mkdir /var/www/html/wp1
$ cp -r wordpress/* /var/www/html/wp1
$ chown -R apache.apache /var/www/html/wp1

Read the readme.html file with a web browser.

Step 2: Configure MySQL and create wp-config.php

Create the database wp1 in MySQL
$ mysql -u root -p
> create database wp1;
> /q

Open a web browser with URL to the installed page of WordPress.


Fill the fields and click Submit.

Click Run the Install.

Fill the 5-minutes WordPress Install information
  • Site Title
  • Username
  • Password
  • Confirm password
  • Your E-mail
  • Privacy
Click Install WordPress.

Click Log In.

Enter the admin username and password.

View the admin user's dashboard.

Restart apache web server.
$ sudo service httpd restart

Step 3: View the site

Enter in the web browser URL

The default left panel list;
  1. Site name
  2. Search tool
  3. Recent post
  4. Recent comments
  5. Archives
  6. Categories
  7. Meta (Site Admin, Logout, Entries RSS, Comments RSS, WordPress.org)


Problem 1: When choosing to add a new theme, the following error is displayed.
"unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums."

Solution: Ensure the server can connect to https://downloads.wordpress.org site. Restart Apache web server.

Problem 2: Pages are blank, and there are no error or warning messages.

Solution: Turn on the debug by changing the value false to true in /var/www/html/wp1/wp-config.php

define('WP_DEBUG', true);


No comments:

Blog Archive