I have already written over this once, but even that time, I mentioned that “I am not expecting anyone to learn from this article that “How to make A Website out of WordPress” by this website, as my approach was kind of naïve and nursery kid’s learning”, but this topic was something that kept on tempting me and today I am back.
In fact, I was to design a website for my workplace for internal requirements, so I thought to revisit the instructions and pen them down for once, so that people wishing to do something like that could get the job done in one shot without much R & D.
Why a WordPress?
Reasons might be plenty.. from a Company to even a Coffee shop now days wanna have a site and their opinions on it. Yes!! blogs are here and they get recognition too, but a site is a little different thing look-wise and even bloggers wish to have their full control over their blogs, which online hosting like WordPress and Blogger couldn’t afford to provide for their right reasons.
Reasons are plenty for a WordPress based website. You may want to have a website to show off between your friends on the same LAN in some college like MNNIT, IIT, IIIT or some IIM or you may want to bring a community or even official platform for company insiders.
WordPress because, it seems to be the best solution against its competitors for Installation, Management, controls, scaling and even backup/ migration. In just few mins, even a Layman get a strongest of website running and he wonders that he never knew a single line of HTML.
“Simplicity is power” That’s why WordPress. Otherwise technically speaking ..
WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. It has many features including plugin architecture and a templating system (supports various themes that way). Used by over 300 of the 10,000 biggest websites, WordPress is the most popular blog software in use today.
My requirements this time ..
The purpose was be to build a one-stop website to provide a common platform for sharing information, internal news and more importantly a mean to interact with groups and individuals across the company (via group/ private chat solutions). The additional scope of the website was integrating all of our web modules running for different purposes mostly via web links only (easy way).
Additional features asked for were …
All of the content needs to be secured via passwords and login would be required for access any of the content on website.
Different pages required for different department/ groups, which will host posts from their side only (though all of the content would be subjected to moderation).
Different levels and roles would be required to post/ modify the content like Administrator, Editor, Author, Contributor and reader with their controlled set of privileges.
Intranet Chat facility requires having group/ private messaging support.
Email facility would be limited to contact form that one could use to submit some query to any department and it will be mailed to designate email ID directly without being post on Website. (provided Internet facility available on server).
News flash system that will show significant information scrolling on sidebars all the time.
Integration with our other services (mostly via hyperlinks opening in tab or new windows) like Ticketing system, Training Modules, Monitoring System etc. The target would be to implement a single-sign-on for the similar web services like Training, Helpdesk etc.
There might be possibly different sites for different networks that would be kept in sync5 by end of day or twice a week (based on feasibility).
Optional Documents hosting that could allow viewing Doc, XLS and PDF documents online without converting them into HTML This feature could be utilized for hosting various policy documents or similar things.
I guess very generic yet professional kind of requirements these are, though one can always find what they want with a WordPress.
You know that installation requirements always vary around what you need and what you could put in. In itself, WordPress isn’t a huge software package that you might be thinking about this side, but yes.. what platform you are going to use, matter more. You can make use of XAMP installation to bring Apache, MySQL and PHP at a place on Windows or you may like to use the natural Linux Platform.
Here I am going to use WordPress MU (separate project build for multi user environment) in place of normal WordPress though requirements and instructions would be the same.
RAM Required: Minimum 512 MB (In favour of OS nto WordPress)
Disk space: Installation doesn’t take even 50 MB, but it’s suggested to keep 1-2 GB space at least.
Operating System: Linux\ Windows (We are using CentOS here)
System Software: Apache with Mod_Rewrite, PHP , MySQL and related components.
WordPress-MU: WordPress-MU package from http://mu.wordpress.org/latest.zip
Note: Internet required for easy Installation of packages and plug-ins, though all the packages could be installed and managed offline as well.
The Basic Installation
The way is as simplest as it could be, but still sometimes, people unknown from Linux terms bring mess for them, so even if longer list of steps, I am trying to bring a completely detailed set of instructions .. (obviously assuming though that you got your OS installed right ways)
- Type on console yum install httpd php mysql mysql-server mysql-devel php-gd php-mysql
Start the web service, if not started. On server console type service httpd start followed by chkconfig httpd on
Start MySQL service, if not started. On server console type service mysqld start followed by chkconfig mysqld on
Edit /etc/httpd/conf/httpd.conf and search for AllowOverride None and replace the second occurrence of the same with AllowOverride All (essential step for Permalink structure, you will know later on). Restart the httpd service by service httpd restart.
On Server Console type mysql and then on MySQL prompt type create database wordpress to create a blank database to host WordPress database in next steps. You can chose any other name than wordpress as well.
Install FTP by command yum install vsftpd, then chkconfig vsftd on followed by service vsftpd start
Edit /etc/vsftp/ftpusers and /etc/vsftp/user_list to comment out root entry in both. By default root is not allowed to login into ftp.
Download the zip file from http://mu.wordpress.org/latest.zip
Extract the same and rename the folder wordpress-mu to something suitable to the name you wish to have in url (e.g. We have atstoday in our case). We also could install the same in web root but in that case, it might have issues in other web app installations.
Copy the same folder in web root directory /var/www/html and provide appropriate modifications rights the same folder and /tmp folder. (Hint: use WinSCP)
Open http://IP_Address/Folder_Name in any browser, where IP_Address is IP Address of the server, you are installing and Folder_Name is name of the folder, you copied into web root.
If everything is fine, then it will provide you the installation page and will ask for Database Connection details. First select radio button for Sub-directories in Blog Addresses option, then in next keep Database Name as wordpress as we given the same in step 4, User Name will be root, password would be blank or if any password you given for MySQL user named root, Database Host would be localhost, Server Address would be the IP_Address, Site Title would be the text you want to be displayed on title bar and then it requires to give an email id essential for password recovery.
If everything goes fine, then it will show success message and will provide a generated33 password for admin user. Note down the password or copy it.
Press the login button, login into the site, go to users in left pane, edit the user and then change the password as per your convenience.
Customizations – Themes and Plug-ins
The above procedure creates the basic install of WordPress-MU. For customization as per needs, you have to go through themes and various plug-ins available for WordPress.
Theme: If online, then we could use the search facility under Appearance->Theme to search, preview and download themes available on WordPress Database. Once downloaded, it will be available in offline install. There is option for uploading themes as well that could be used if Server not connected to Internet. We are using theme named Atahualpa with a few advanced customizations in code here and there.
Plug-ins: Plug-ins provides extension of capabilities for basic WordPress Install though depends on many factors. Currently we are using a few crucial plug-in like: My Category Order, Announcement ticker highlighter scroller, WP-UserOnline, Dagon Design Form Mailer, WP Customized Login, Members Only, PHPFreeChat, WordPress Database Backup and User Access Manager.
Backup and Restore
Post/ Categories/ Tags/ Comments Backup/ Restore: For taking backup of these contents, there is option to export all these in form of .xml file, in Tools->Export.
Similar way, Tools->Import could be used for importing the same.
Settings Backup/ Restore: Inclusion of WordPress Database Backup plugin makes the job little easy. As per settings, it could keep on mailing core database files in zipped format (*.bz2) to designated email ID (provided the server is on Internet) or there are options for taking manual backups by pressing button. For restoring from backup, you need to unzip the backup file first that would be some blog.bak.sql and then needed to restore it via command line in following manner.
mysql -h mysqlhostserver -u mysqlusername -p databasename < blog.bak.sql
Enter password: (enter your mysql password)
Migration from one server to another
That’s the toughest part of the work and not suggested to be performed by someone having not proper idea about MySQL, Apache, PHP etc. I am trying to put all the steps in some easy way here. Though there are better ways around to do this and its not suggested to follow these steps for some online site.. I am talking about local installs only. (In fact, only this part of instruction is something I think needs much enhancement as this way is prone to be buggy in complex environment)
Our assumptions are,
- You have a completely configured and working WordPress based website at one server.
- You got another server with fresh installation.
First of all, you need to perform the first six steps of basic installation as those are preparing steps. Now, you will have a blank database named wordpress ready in MySQL.
First use core backup file from original server and use the steps mentioned in Settings Backup/ Restore to place the same database (including settings/ post/ username/ passwords everything) in new server. In next, copy all the wordpress files that would be in /var/www/html/Folder_Name, in the similar location at new server.
After the same, you need to edit a few options in /var/www/html/Folder_Name/wp-config.php as per the new environment. Then, you need to manually update the new IP Address inside many tables of new database, provided you always used absolute links in your website all the time.
Here is a list of few crucial tables and values to edit.
- siteurl value in wp_1_options table (provided you have only one blog under WordPress-MU otherwise change accordinly)
- domain value in wp_blogs table
- domain value in wp_site table
So, this is whole thing.. any further question.. you can always come up here and ask. I really miss that while studying, I wasn’t aware of this great thing, neither do I was in my starting job days.. hope many of you starting earlier than me.. good luck..
Now you can read updates from this blog delivered directly to your Nokia Smart Phone, download it here