Tuesday, May 17, 2016

This is my first article about Wordpress development. So what is wordpress? and what is custom theme development. Let's get the basic idea about wordpress and custom theme first.
WordPress is a powerful and popular open source content management system(CMS) that built with PHP and MySQL. WordPress CMS invented by Matthew Mullenweg and Mike Little in 2003. If you want more about WordPress history please use this https://en.wikipedia.org/wiki/WordPress link. In early part most of the people using WordPress as a blogger. But now a days most of the news, business, personal websites built with WordPress CMS. If you want to know about the sites that built with WordPress please refer this link https://wordpress.org/showcase/

There are lot of content managed systems in the world. Why most of the people using WordPress for their website development? Because I think WordPress theming is bit easier than other CMS theaming. That is a real advantage of using WordPress. Early days there is a big issues in WordPress security but now development teams are able to fix that security issues as well.

So now let's focus on WordPress development. Before we start, this article is not for beginners and at least you will be able to install WordPress in your computer.


Lets' start.

There are lot of custom WordPress themes in the world. According to Theme-Forest website they have more than 6,000 premium themes.

Before we start you have a basic knowledge in PHP, Wordpress, some design skills(HTML, CSS, Java Script) as well. First we need to install WordPress in your computer. WordPress gave us three themes on WordPress installation.

If you want to create a custom theme in WordPress first you need to create file base for that. For that you can use http://underscores.me/ web site. In that web site they will give us a file base for given name.
Ex:- if you want to create a theme name "AAA", you should enter "AAA" in theme name text field.
After that underscores.me site will give you a zip file with your theme file base. Then you can install and activate that theme using Appearance --> Themes section in WordPress admin panel.

This is not a well designed theme. They provide us a basic sketch of or theme. If you open your theme file base, You can see there is a folder named "template-parts". This is the folder that underscores.me store their template files.
These are the files that underscores.me will provide
















Now you have an empty theme. So you can design your own theme by using your design skills.
https://codex.wordpress.org/Theme_Development This is the best site to learn about custom theme development.

Let's discuss about custom admin menus, custom fields for WordPress admin in my next article.

My experience

This is my first experience in VPS hosting. I was trying to install apache tomcat version 6 in my Godaddy VPS by using SSH. But is not worked.  Then I found a very good article from the google. (http://www.mysamplecode.com/2012/05/java-tomcat-hosting-beginner-experience.html ) But It's not worked for me. Godaddy provided tomcat version 7 in their WHM cPanel. I installed it but tomcat 7 not supported in my webapp. It's getting 404 error in my webapp.  Also I was trting to setup local server for tomcat 7 and it's getting me same error.

Then I try to solve this problem in 2 and a half day.  I was googling and did what said in articles, ask from a friend who has some good knowledge in servers but they are unable to find a solution for it.. Finally I was call to the godaddy customer service for getting their help. But they said, they did not provided any installation support for 'Managed' VP servers. 

Then I was realized, Ok, no one can help me in this case, But I have to do it, So how can I do this? 
Then I destroy and rebuild the server and started form the beginning.


How to Install

Before you started, you need to enable root access. Godaddy provided a documentation for that.

If you want to install java  please refer this documentation (Please do not install tomcat 7 version) - https://in.godaddy.com/help/how-to-install-apache-tomcat-12290

Then log in to your WHM cPanel and go 'Install an RPM' and install all the tomcat6 related component one by one.

After tomcat6 installation you can log into your VPS usinig putty (Hope to write putty configuration article in next time). 


If you doing some changes in the server, you should have root permission. So switch to root user, type 'sudo su'. If you needs more help please refer this godaddy documentation ( https://in.godaddy.com/help/switching-to-the-root-user-on-your-linux-server-12330

Then go to your var/lib folder. You can see installed tomcat6 folder their. Then type 'sudo service tomcat6 status' to get your tomcat 6 status. 


If status is stopped, You can run 'sudo service tomcat6 start' to start the server. Then tomcat6 will start in 8080 port. To check the Tomcat running enter the IP address of your VPS server and port 8080
http://yourVPSIPAddress:8080.