Category Archives: Content Management

I will list all the web CMS and database management systems related articles under here. You may come across useful article also in the Computer Science category.

Maximum Input Variables WP Error

The max_input_vars limitation error is a very common issue that most WordPress web developers and website owners may encounter at some point in their career. Few days ago, my website also experienced the same problem. The solution is very simple; increase the value assigned to max_input_vars in the PHP configuration file on the web server. However, depending on server setup, you may have to do few more things to get this problem fixed.

Editing php.ini may result in complete failure of the php module and it may put your website out of service. If you are hesitant about something, hire a professional. I take no responsibility for any issues arise out of the following instructions.

Continue reading Maximum Input Variables WP Error

How to fix WP Error Establishing a Database Connection

The Error Establishing a Database Connection error is a very common issue on WordPress. This issue is caused by a connection failure between the WordPress CMS and the SQL database. Here is a simple guide to fix the problem.

A typical error message displayed on site.
A typical error message displayed on site.

Finding the cause

This can be caused by several issues. If you are getting the same error, “Error Establishing a Database Connection”, on the main front page as well as the wp-admin section, then the problem is most likely the credentials. This is the most common reason for this issue. However, if the error message on the wp-admin section is different from that of the front page, then it is most likely caused by a database corruption. I will explain several methods to fix the problem.

Fix wp-config file

From the back-end of your server, open the wp-config.php file in an editor. If you are using cPanel, then you can do this from file manager. If you have your own server, you can access the file either using FTP or remote desktop connection. Check if the following parameters are setup properly in wp-config.php.

define('DB_NAME', 'database_name');
define('DB_USER', 'database_username');
define('DB_PASSWORD', 'database_password');
define('DB_HOST', 'localhost');

The information in wp-config.php file should match the corresponding current database user account. These accounts should be listed under under MySQL Databases section of your server. On cPanel it is located under Databases sub section.

MySQL in cPanel
MySQL in cPanel

Typically the database name is composed of your username_databaseName. All the current databases and users will be listed within the MySQL admin page (example shown below).

List of current databases and users.
List of current databases and users.

If the exact same username appears in the MySQL current list as it is in the wp-config, then it may be the password. You cannot check what password is used for each user account. But you can change the current password. To do that, under MySQL Users –> Add New User, enter the current username, Then enter a password you prefer. This will update the existing account.

Updating the password for a user.
Updating the password for a user.

Fix corrupted database

As mention above, if the error message on the wp-admin section is different from “Error Establishing a Database Connection”, then it is caused by a database corruption. WordPress comes with a built in repair method in repair.php. First add the following to the top of wp-config.php file.

define('WP_ALLOW_REPAIR', true);

Then run the following file located at, It will provide you with “Repair Database” and “Repair and Optimize Database” options. Choose either one to fix the issue. Once the repair is successful (or not), please delete the WP_ALLOW_REPAIR from the wp-config.php file. With the code in place, anyone one access the repair page without administrative account.

Connection to database

This can be tested by running a simple PHP script. Create a PHP file with the following code such as test.php.

$link = mysql_connect('localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';

If it provide a feedback with a successful connection, then your database is working. If not, either the database is corrupted or the sever files are damaged. Contact your hosting company for help. If it is your own server, then your best hope is to replace the MySQL files with available backup.

Protect and secure WordPress admin

The plain HTML based websites are no longer popular on the net. This is because the PHP based Content Management Systems (CMS) offer wide range of flexible solutions. From development stand point CMS programs allow easy integration of different tools such as jQuery, JavaScipt, PHP scripts and many more. From end-user point of view, it is much easier to manage a CMS based site like a WordPress or a Drupal site than to carefully edit each HTML Continue reading Protect and secure WordPress admin

Building a website

I do not think you need an explanation on what is a website. It is a digital platform that can be used to share information and media across the general purpose Internet (as opposed to internal sites). I have been asked by several people about website development. So I compiled this handy little FAQ type article so that you have all the answers in one place.

Basic questions

What do I need to create a website?
You need a web address, sever space for hosting your site and access to a decent Internet connection.

How can I obtain a web address?
You can obtain a web address from a domain registrar or a reseller. If you are also looking hosting options, you can also get a domain name from the same company that hosts your site. I use two companies; one for my domain and one for my hosting.

What domain name should I use?
If you are looking for free web hosting, please read the next question. But if you decided to create your own top-level domain (TLD) then I recommend using common/generic domains such as .COM, .ORG, .NET, etc. The .COM would be the preferred one.

If you are developing a website for country specific item or the name you desired is not available, you can get with a country code top-level domains. For example, But beware of legal restrictions such as residency requirements. Some domains like .CAs can be registered by anyone. But others like .IN, you must need an Indian physical mailing address to register. Make sure you read the requirements when going for country specific domains before you register.

Additionally please do not register domain names of established companies and organizations. This will get you in hot water. For example, if you register, you may be taken to court by the UofC.

It is possible to me to have a free website?
You can get a free web address from several different companies and organizations. For example, the WordPress (WP) offers free web addresses with hosting included at WordPress. If you need more detailed information on free WP setup click here. Of course there are other free service providers out there. Feel free to search for such providers. However, one big advantage of using WordPress based free service is that if you decided to migrate your entire site to a new server later time, it can be easily done with WP installs. Note that all free services will provide you with a sub domain names as opposed to top-level domains (TLDs). For example, instead of

Website design and building questions

How can I build a website?
There are few different ways. The most complicated, but the most primitive method is to develop using basic HTML pages.

The best option is to build a site with a Content Management Program (CMS). They allow you to use pre-configured templates with almost unlimited options for customizations. This saves a lot of time and money since most people can build a website by themselves without using a third party web developers. I highly recommend using a CMS like WordPress or Drupal. Even large organizations such as University of Calgary and CNN use Drupal and WordPress for their sites. These programs are free in almost all hosting packages.

Can I build a website on my own sever?
Yes you can. You can use simple HTML pages or you can also install CMS program for free on your server.

What do I need for my own server?
If you are asking this question and you do not already know the answer, please do not build your own server. Unless you have the time, resources, knowledge and enthusiasm to maintain your own server, please do not try this method. For that reason plus it will take a long explanation, I am not going to answer this question. Do your down research and use diligence to determine if it is worthwhile to do so. Remember, it will cost you a lot more to have your own physical server than to rent (“buy”) hosting from a company.

Can I get my own email address?
Once you have your own domain top-level name, you can create your own email address. There are two ways to do this; one is to go with Google Apps or if you went with a hosting provider, the hosting package will come with an email system included.

Note that Google Apps are no longer a free service.

Content and miscellaneous

Can I promote my site on search engines?
You do not have to do anything to add your site to Google Search. But you can speed up the process via Google Webmaster Tools. You can promote your website for a fee, but only do so if you are earning money off of the site itself. It is not worth it, if it is a personal website.

What can I publish on my website?
You can publish any media (images, videos, animations, etc) and text. The media files will take a lot of space and bandwidth on the server. Therefore be resourceful of what you publish and be smart. You can post videos on YouTube and embed the video to your website to save storage. You can reduce the size of the image by reducing high resolution images, etc.

While you can publish anything you want, beware of the local and international laws. Even in Canada, you are not allowed to publish certain items online such as other people’s personal information without explicit written permission, images obtained (copied) from other websites without appropriate reference or clearance, etc. In some counties publishing pornography or even birth control, etc may be considered illegal.

Can I sell items and/or accept donations online?
In most countries, including Canada, yes you can. But make sure you keep records of all your transactions for tax and auditing purposes. If you are a small company or if this is your personal website, I recommend using PayPal as a payment processing service provider. For donations this can be done simply via a link to the PayPal site. For ecommerce, you would have to install either a module on your CMS or install an ecommerce specific CMS to integrate payments via PayPal. Unless you are a large company or a growing small business, I recommend against accepting direct credit card payments.

Can I publish a website in languages other than English?
Yes you can. Simply write the pages in whatever the language you prefer. But for non-English languages, the site must have proper language coding at the top of the code. Even English and Chinese can be setup on the same page using UTF-8 Encoding standards.

Where can I learn HTML?
Google is your friend! Even with a CMS, you must learn at least basic HTML tags in order to maintain a website.

I am sure you probably have more questions. If you do not find this page helpful, try searching online or you can contact me with your questions.

Installing web applications

There are two major platforms used commercially for web development; Microsoft Windows Server and Linux based OS versions such as Red Hat Enterprise. You could also get a fully operational free version of Linux Operating Systems for personal or small business use. Out of the two main platforms, the most popular one among large companies is Microsoft Windows Server. I will demonstrate how to install a Web Application using the Microsoft Web Platform Installer (version 4.6 to be exact).

Web Applications

Web Applications, Scripts or web modules are programs that can be installed on a server to manage web based media. It can be databases such as SQL, or server side languages such as PHP, or web Content Management Systems (CMS) such as WordPress and Drupal. Some of these programs depend on others. Drupal and WordPress depend on PHP database so a server must have the PHP module installed to support them.

Microsoft Web Platform Installer (Web PI)

Web PI is a free software package (yep… it is legally free) developed and distributed by Microsoft. You can download it here. In includes a large repository of free web applications for web development and deployment. To install it, you need a Windows based operating system. It could be a server type OS or a regular desktop OS like Windows XP, 7, 8, etc. Check their website for supported systems.

I will use the Web PI 4.6 installed on Windows Server 2012 Datacenter OS for my examples. But the process is the same/similar regardless of the Operating System. Please note that this article explains the Server Administer side installation process. The client side installation process, which you usually get through a web hosting company, has a completely different installation process (on shared hosting).

Installing WordPress Web App

WordPress is the most popular platform for blogging for awhile. Recently full-blown websites have been built on it. The WordPress platform became popular because it has an easy to use user interface and a streamline update system. Naturally, I will use the WordPress Web Application as an example. But you can install any other program or application using Web PI following the same steps.

1) After installing Web PI, select “Products” tab from the top. Install “ISS XX.XX Express” and “ISS Recommended Configuration”. You may have already installed these on your server during the initial setup of the system.

MS Web PI Products Tab. Make sure the key components are installed.
MS Web PI Products Tab. Make sure the key components are installed-Click to enlarge.

If the PHP module is not installed, you will be prompt to install during the install of applications that depends on it. Since we are going to install WordPress, you may also install the PHP module now.

2) Select “Applications” tab and “Add” all the Web Apps you would like to install. You may install more than one at a time. After adding, press “Install”.

MS Web PI Applications Tab. Add for installation.
MS Web PI Applications Tab. Add for installation-Click to enlarge.

In this particular example, I will be installing one application; WordPress for Windows. Other options include variety of CMS such as Drupal, Joomla, Orchard, .NET, etc and web programs such as Moodle, Gallery Server Pro, etc.

3) The PREREQUISITES Window will check for all dependencies. If a dependency such as SQL or PHP is not installed, this will add those to the installation process. Accept for installation. Depend on the speed of your computer components, it will be installed in few seconds to a few minus period.

Prerequisites for WordPress Web Application.
Prerequisites for WordPress Web Application-Click to enlarge.

Application installation process.
Application installation process-Click to enlarge.

4) Once installation is completed, you will be greeted with the CONFIGURE Window. Select the location of install in your system from “Web Site” drop-down. The “application name” will determine the folder in which the installation will be done. In this case I choose “wp” as my application name. Hence the final access will be at http://localhost:80/wp and you may change the root folder of the site later. Keep reading this article for more information on how to do that.

WordPress installation server location setup.
WordPress installation server location setup-Click to enlarge.

5) The next CONFIGURE Window has a form which user should edit. Do not panic! All those “Keys” can be confusing. Just enter either a random set of numbers and letter or something meaningful to you. It does not matter what you enter. I usually use the exact same set of characters for all of the options. Press “Continue”.

Web Application Configuration Window. Type several characters for each option (key).
Web Application Configuration Window. Type several characters for each option (key)-Click to enlarge.

6) Record all the “Password Settings” information under the FINISH Window. You may “Copy to clipboard” and paste it somewhere for saving as well. I usually save in a Text file.

Password Settings for WordPress app Install.
Password Settings for WordPress app Install-Click to enlarge.

Now you may visit the site by selecting “Launch WordPress” or you may simply type the location address in Step 4 on a Internet window. Close the windows by pressing “Finish”. The first thing you will see on the Internet window is a setup page. Each Web App has its’ own setup page. In this particular example, it will be a WordPress CMS setup page. This is the final step!

WordPress CMS setup page.
WordPress CMS setup page-Click to enlarge.

Additional options

We setup the Web App in a folder named “wp” in Step 4. But let’s say your client insists that their website should not have “wp” as prefix ( You do not have to reinstall everything. You do not have to relocate the folders on the server either. What you need to do is to go to the domain settings and make “wp” your root folder. Now the will be Another way to do this is through domain registrar options. You can point the domain name to wp folder from there as a root.

As mention before, you may install any of the Web Applications on a single server. They very lightweight programs, that they will not effect the performance of the server (but the traffic flow will). I highly recommend using different folders for each Web Application. This will avoid conflicts between them.

By default, all web applications take Port 80 (HTTP port) over others. However, you may also change this to whatever the port you want. You may ask, why would you want to use non-standard port? One reason would be that you are a developer or a student. If your ISP blocked access to Port 80, then you can bypass this by using a different port and utilizing port forwarding.