Basic terms of web robot.txt

What is a Web robot:

In basic, a web robot is simply a program. The robot is used to automatically and recursively traverses a Web site to retrieve document content and information. Search engine spiders are the most common types of Web robots. These robots visit Web sites and follow the links to add more information to the search engine database.

Web robots often go by different names. You may hear them called:

  • spiders
  • bots
  • crawlers

Commonly Web robots is used to index a site for a search engine. But robots can be used for other purposes as well. Some of more common uses are:

  • Link validation – Robots can follow all the links on a site or a page, testing them to make sure they return a valid page code. The advantage to doing this programmatically is inherently obvious, the robot can visit all the links on a page in a minute or two and provide a report of the results much quicker than a human could do manually.
  • HTML validation – Similar to link validation, robots can be sent to various pages on your site to evaluate the HTML coding.
  • Change monitoring – There are services available on the Web that will tell you when a Web page has changed. These services are done by sending a robot to the page periodically to evaluate if the content has changed. When it is different, the robot would file a report.
  • Web site mirroring – Similar to the change monitoring robots, these robots evaluate a site, and when there is a change, the robot will transfer the changed information to the mirror site location.

Share with:


Simple way to create a custom layout in wordpress theme

I was always thinking how some people create completely different looking pages on their WordPress theme. Currently we see that from an static page to ecommerce site is developed using WordPress package. Many sites has different layout for different pages. WordPress provide a simple solution to create custom layout for our website built on wordpress. A custom layout of wordpress page is helpful if we want to have a layout that looks completely different than rest of our blog but still executes on WordPress CMS.

In this tutorial I will try to describe you how we can create a custom page in WordPress using the custom page template snippet.

Lets create a custom page by opening a blank file in an editor. In the very beggining of the page paste the following code:

<?php /* Template Name: MyCustomLayout1 */ ?>

For example:

<?php /* Template Name: Alternative Home Design */ ?>

Lets save the page as: custom_layout_1.php. The above code is simply giving a name to the template. so we can call our template MyCustomLayout1, but you can call it whatever you like for example: archive,

Share with:


Install LAMP Server Easily using command line

Hello Linux Lovers! The acronym LAMP is derived from first letters of Linux, Apache HTTP Server, Database MySQL, and Language PHP, Perl or Python. We already have shown you how to install LAMP on many platforms. So we can say that LAMP is a combination of operating system and open-source software stack. Lets start the LAMP setup procedure:

1. To install LAMP run the below command:

sudo apt-get install lamp-server^

2. Run the following commands to setup user for your apache server, add permission & enable some modules:

sudo usermod -a -G www-data YOUR_USER_NAME

sudo chgrp -R www-data /var/www

sudo chmod -R g+w /var/www

sudo apt-get install php5-curl

sudo a2enmod rewrite

3. Restart the apache server:

sudo /etc/init.d/apache2 restart

4. We will open the /etc/apache2/apache2.conf file in text editor to enable rewrite options. Run the below command:

sudo gedit /etc/apache2/apache2.conf

and modify the below snap of script.

Share with:


Getting started with Sass and Compass from scratch

Recently my team leader has decided use sass for our web projects and I have no idea about sass or compass, even never tried to search about it, lol! So just started searching for tutorials to configure Sass for my project.

Here I am going to write about the following steps that are used to setup and configure Sass for my project as my note for future reference, But wish it will also helpful for them who want to get started with Sass from scratch.

  • What is Sass?
  • Install Compass and Sass
  • Configure Sass and Create a test project

What is Sass?

Sass (Syntactically Awesome StyleSheets) is an extension of CSS that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized, and get small stylesheets up and running quickly, particularly with the help of the Compass style library.

Share with:


Protect wordPress special files from direct access

Block access to backup and source files. The below script in .htaccess tells the server to look for files with any of this extensions: [filename].config, [filename].sql, [filename].bak and so on, and if so, deny processing requests for such files.It will return a 403 Forbidden error instead.

<FilesMatch "(\.(config|sql|bak|ini|log|sh|inc)|~)$">
Order allow,deny
Deny from all
Satisfy All

For extra security we should block access to the WordPress readme.html file and other default WordPress files which publicly display your current WordPress version number. Rather than deleting these files, it’s better to add the following directive to our .htaccess file to block public access to these files.
[manage_adv width=”486″ height=”60″ sponsor=”affiliate” type=”image”]

<FilesMatch "^(wp-config\.php|readme\.html|readme\.txt|license\.txt)">
Order allow,deny
Deny from all
Satisfy All

Share with:


Lets start with the ultimate guide to wordPress multisite part -4

Previous three articles of this series:

Managing Your Network: Updates, Users and Settings

As well as managing the individual sites in your network, you’ll need to manage the network itself. This will include:

  • Updating WordPress
  • Updating themes and plugins
  • Managing users
  • Customizing the settings.

Let’s take a look at each of these in turn.

Updating WordPress

Updating themes, plugins and WordPress itself via the network admin screens is straightforward: you’ll see a notification if any of your code needs updating and you simply update it in the same way as you would for a normal site. Updating WordPress is a two step process: you need to install the update and then update the network of sites. This is just a case of clicking a couple of extra links which WordPress will guide you through.


The Users screen works in the same way as for a standard WordPress site: it will list all of the users on your network and let you edit and delete them. This will include users that site admins have added to your site as well as users who’ve signed up for a site.

The one main difference is that the Users screen tells you which sites a user has access to. If you want to add a user to a site, you do so via the Users tab in the site settings.




You use the Network Settings screen to customise the way your network is used:


Settings you can customise are:

  • The title of your network
  • The network admin’s email address
  • Registration settings: whether users can register accounts and/or sites, whether site admins can add new users, and email domains and site names which are banned.
  • New site settings: the content of the welcome email for site admins and users and the first page, post and comment created on new sites.
  • Upload settings: file types permitted and maximum file size
  • Language settings: the default language
  • Menu settings: enable or disable the plugins menu item for site admins. If you disable this they won’t be able to activate or deactivate plugins.

 Managing and Maintaining a Huge Network of Sites

Share with:


Lets start with the ultimate guide to wordPress multisite part -3

Previous two articles of this series:

Installing and Activating Themes

Only the super administrator of a network can install themes and make them available for sites to use. You can do this in one of two ways: you can allow them for individual sites or you can network activate them. A theme can only be activated on a site if it’s been network enabled or enabled for that site.

Here’s how you install a theme and network enable it:

  • In the Network admin screens, go to Themes > Add New and install the theme in the same way as you would for a standard WordPress site.
  • On the ‘Installing Theme’ screen that appears, click the Network Enable link.

Alternatively, to network enable a theme you’ve already installed, click on Themes to go to the Themes screen, then click the Network Enable link below a theme.

[manage_adv size=”responsive” sponsor=”amazon” type=”image”]

You can also enable a theme just for one site. This can be useful if your network runs lots of sites each of which will need a different theme, for example if you’re hosting client sites. Enabling themes by site means that other themes won’t be available to sites which don’t have them enabled, so there’s no risk of site admins accidentally activating the wrong theme.

To do this, follow these steps:

  • In the Network admin, click on Sites to view all of your sites.
  • Hover over the name of the site you want to enable the theme for and click the Edit link that appears.
  • Click the Themes tab to view the themes settings screen for the site:multisite-enable-theme-for-site
  • Under the theme you want to enable, click the Enable link.

Now when you go to the site administration screens for that site and click on Appearance > Themes, you’ll see the theme you’ve enabled included in the available themes for activation:


Installing and Activating Plugins

Plugins also have to be installed by the network administrator, but they work slightly differently with regard to the sites on the network. You can’t enable a plugin for an individual site: instead you can network activate it, so it runs on every site on the network, or you can just install it, so that individual sites can choose to activate it.

Network activating plugins is useful if you’ve written or downloaded a plugin to provide features which you want all of your sites to have, for example on my network of client sites I’ve installed the Snapshot plugin to ensure that all of the sites are backed up regularly. Here’s how to install and network activate a plugin:

  • In the network admin screens, got to Plugins > Add New and install the plugin as you would in a normal WordPress site.
  • In the Installing Plugin screen, click the Network Activate link.

That’s it! The plugin will now run on all the sites in your network and site admins won’t be able to disable it.

But what if you want to just activate the plugin on one site? That’s done by installing the plugin as a network admin and then activating the plugin if you have site admin privileges for the site.

  • In the network admin screens, got to Plugins > Add New and install the plugin as you would in a normal WordPress site.
  • In the Installing Plugin screen, click the Return to Plugin Installer link.
  • Visit the site admin screens for the site you want to activate the plugin for and click the Plugins link in the admin menu.
  • Under the plugin you want to activate, click the Activate link as you would in a normal WordPress site.

You’ll notice that in the Plugins screen for a site admin, there’s only the option to activate or deactivate plugins, not to delete or update them:

Share with:


Lets start with the ultimate guide to wordPress multisite

In this article I’m going to show you everything you need to know to get started with Multisite and create your own network of blogs or sites.

I’ll cover:

  • What is Multisite and how is it different from regular WordPress?
  • Uses for Multisite (with some examples)
  • When not to use Multisite
  • How to activate Multisite on a new or existing WordPress installation
  • Creating blogs in your network
  • Managing your network, including installing themes and plugins, creating sites and setting up domain mapping
  • Plugins to make Multisite even better.

But first, let’s get some terminology straight. In this post I’m going to use the word network and site to refer to two different things:

  • Network refers to the entire Multisite network, i.e. your WordPress installation
  • Site refers to one of the blogs or sites created as part of the network.

So when I refer to your site, I don’t mean your whole network of sites, but just one of the sites on it. Each network will have a main site, which is created when you install WordPress and which will probably use the main domain for your WordPress installation: that’s still a site. I’ll explain this in more detail as we go along.

So now we’ve got that sorted, let’s take a look at Multisite!

What is Multisite?

The Codex defines WordPress Multisite as:

A feature of WordPress 3.0 and later versions that allows multiple virtual sites to share a single WordPress installation.

This means that by installing WordPress just once on your server, you can run as many sites as you want, and I really mean as many as you want. At the time of writing, hosts approximately 37 million sites, and our own hosts nearly 3 million educational sites. You won’t be able to host millions of sites on a standard Multisite installation though – later in this post I’ll cover some plugins and techniques you can use to host large numbers of sites.

Share with:


Lets start with the ultimate guide to wordPress multisite part -2

This is second article of Lets start with the ultimate guide to wordPress multisite. You should read the first article to start from the beginning of the ultimate guide to wordPress multisite.

Activating Multisite on a Fresh WordPress Installation

Activating Multisite when you install WordPress involves a few extra steps. Firstly, you need to install WordPress and allowing a network.

  • Install WordPress in the normal way. Download WordPress and use the ‘famous 5 minute install’ to install it on your server or local machine.
  • Open your wp-config.php file which you’ll find in the folder where you installed WordPress. Find the line that reads: /* That’s all, stop editing! Happy blogging. */
  • Immediately above that line, create a new line that reads as follows:define( ‘WP_ALLOW_MULTISITE’, true );
  • Now save your wp-config.php file.

[manage_adv size=”responsive” sponsor=”amazon” type=”image”]

The next step is to visit the WordPress admin screens and install Multisite.

  • In the WordPress admin, go to Tools >Network Setup. You’ll be prompted to choose subdomains or subdirectories for your installation: choose the one that works for your network.
  • Edit the title of your network and email address of the network administrator when prompted, or leave them as they are.
  • Click the Install button.

The final step is to copy some code provided by WordPress into your wp-config.php and .htaccess files.

  • You will be taken to the Network Install screen:
  • Open each of your wp-config.php and .htaccess files and edit them in line with the text provided on the screen. If you can’t find .htaccess on your server, it may because hidden files aren’t visible: change the settings in your code editor if you’re using one to access your files.
  • Save both files.

WordPress Multisite will now be installed. You’ll need to log in again, and when you do so you’ll see the dashboard:

Share with:


Add author bio with social links to blog post

Often we like to add a author bio at the bottom of blog post. To do so we use external plugins. By adding few script to our theme function file we can easily create our own custom author bio for our blog post. Lets see what type of field we need to get user/author social links:

author links field screenshot

What we need to add in function file:

if ( is_admin() ) {
    add_filter('user_contactmethods', 'author_bio_social_links');

    function author_bio_social_links( $data ){
        $data['author_twitter_url'] = __( 'Twitter', 'msbd-theme' );
        $data['author_facebook_url'] = __( 'Facebook', 'msbd-theme' );
        $data['author_github_url'] = __( 'Github', 'msbd-theme' );
        $data['author_wp_url'] = __( 'Wordpress', 'msbd-theme' );

        return $data;

[manage_adv size=”responsive” sponsor=”amazon” type=”image”]

Now we will show the author bio with the social links we have added to admin section:

Share with:


Errors while running the photoshop in wine and install windows system fonts

After installed the Photoshop CS2 with wine in Linux mint 17, tried to open a psd file. But the photoshop crashed with the message “Unable to continue because of a hardware or system error“. After wasting 2 hours got a solution to fix it. Let sort out the process step by step:

  • Hold down all three Ctrl+Alt+Shift buttons
  • While keeping those button held, just open Photoshop or a file that opens with Photoshop
  • As Photoshop loads, you should get a prompt asking if you would like to “delete the Photoshop settings file”
  • Off-course click yes

Is that solved my issue? Yes, after that i was able to open Photoshop. But sort out a new issue!

When i try to open a PSD files that was created on Windows system, the software shows error – “Could not complete your request because of a program error” and I am unable to reopen the PSD files. So, after googling few minutes i got a solution that is to install Windows system fonts. To install windows system fonts, execute the following command:

sudo apt-get install msttcorefonts

and then (to make sure font cache is regenerated) :

sudo fc-cache -fv

It works for me and for future reference just blog this as a note!
Hope this helps!

Share with:


Get the authors list who submitted highest number of posts in wordpress

Now a days the use of wordpress content management system is not limited to a blog or a portfolio website, it is also used as a eCommerce website platform. No matter how we use it, we often need the highest post submitted author list. Using below script you can get the list of authors who submitted highest number of posts in WordPress.

    function top_authors_list($number = 10) {
        $html = '';
        $uc = array();
        $blogusers = get_users();

        if ($blogusers) {
            $html .= '<ul>';
            foreach ($blogusers as $bloguser) {
                $post_count = count_user_posts($bloguser->ID);
                $uc[$bloguser->ID] = $post_count;

            $i = 0;
            foreach ($uc as $key => $value) {
                if ($i <= $number) {
                    $user = get_userdata($key);
                    $author_posts_url = get_author_posts_url($key);
                    $post_count = $value;
                    if ($post_count > 0) {
                        $html .= '<li><a href="' . $author_posts_url .'">' . $user->display_name . '</a> (' . $post_count . ')</li>';
            $html .= '</ul>';

        return $html;



Share with: