One of the most popular programs for blogs and even content management is WordPress. What makes WordPress so popular is the ease of use, flexibility in set up and great support. WordPress does an excellent job at providing documentation and options for everyday use.
There are now almost 4000 plugins available for WordPress. Plugins give you the ability to add additional features that you want for your site. There are almost 600 themes to make your WordPress stand out from others. Another unique feature is that WordPress has an ideas section that has over 2000 ideas that people have proposed for WordPress helping it grow in the direction that people want. All of this can be found at http://wordpress.org.
The one feature that helps WordPress stand out over other options that you have like Joomla for example, is that WordPress has done much more work on SEO, aiding your site in becoming more search engine friendly.
Here is a tutorial step-by-step in setting up a WordPress site on a Linux server.
WordPress requires several components to be able to work correctly.
yum install httpd php mysql-server php-mysql
sudo apt-get install apache2 php php-mysql mysql-server
service httpd start
service mysqld start
sudo /etc/init.d/apache2 start
sudo /etc/init.d/mysqld start
Create Your Database
You will need create a database before you can set up WordPress. Once your mysql server is running then you can login and configure it. This login assumes you have already created a password for the root account, if not you can create a password for the root account on mysql with this:
mysqladmin -h localhost -u root password “my_password_here”
Now you can login with a password for the user root. Note this mysql user is not the same root on the Linux system.
mysql -p -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8891
Server version: 5.0.45 Source distribution
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
Now you can see the databases that are already created with this command:
mysql> show databases;
| Database |
| information_schema |
| mysql |
| test |
| bu2 |
4 rows in set (0.00 sec)
If you wanted to create a new database for your WordPress then you would use the create command like this that will create a database with the name you provide:
mysql> create database effective;
Query OK, 1 row affected (0.00 sec)
Here the database name was effective and was created by the root user who will then have access to that database.
Copy WordPress to your base directory, usually /var/www/html or /var/www. Now unzip the program.
Now you have a decision to make about how you want to use WordPress. If you want to add a blod to an existing site move the directory name to blog:
mv wordpress blog
Then all the content would be located under your URL/blog. However, if you want the content to be located in the base directory copy all of the files there.
cp -R wordpress/* /var/www/htdocs/web_site/
Be sure to change the permissions so that apache (CentOS) or www-data (Ubuntu) can read the files.
chown -R apache:apache *
sudo chown -R www-data:www-data *
Now you need to rename a file called wp-config-sample.php file to wp-config.php
mv wp-config-sample.php wp-config.php
Once that is done you will need to set the config file so it can find your database that you created. Set the user(root), set the database name(effective or whatever you choose), and set the password for the user who has access(in this example the root password).
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
/** Database Charset to use in creating database tables. */
Now that that is done point your browser to the startup page to initialize the install.
Now you can follow the online questions and set up the site. You will receive a unique password for your WordPress admin that you better write down because you will need it.