Category Archives: WordPress

Redirect 404 page to WordPress home page.

404 is special kind of HTTP error which specify that the resource you are looking is not available.

Causes of 404 Error :

Many times we are not aware of the 404 errors occurred. There are many causes of the 404 error,

  1. When 3rd party sites link your URL or resource incorrectly
  2. You have made some URL structure change without permanent redirect so your old links are ended on 404 page.
  3. Sometimes you don’t want to keep some old posts then you may delete it. After deletion any request made to see that post results in 404 error.

Redirect 404 page to WordPress home page :

404 error
WordPress handles such type of common error more efficiently.Whenever resource is not available then by default user landed on 404 page provided by user.

Steps performed :

  1. Go to WordPress dashboard -> Appearance -> Editor
  2. Now in the theme editor find 404.php template.
  3. Add following code in the template and save.
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>

now when bad request is requested then page will automatically redirected to the home page.

15 Keyboard Shortcuts for WordPress Comment Moderation

When we are having huge number of comments for moderation then it is very tedious task to moderate each and every comment. We need to open each individual comment and review each comment. After reviewing comment we need to publish it.

Keyboard Shortcuts for Comment Moderation :

First of all we need to activate setting for Comment Moderation using Keyboard Shortcut by visiting the profile page

Go to Users -> Your Profile then you will be on the following page -

Now Change the setting for comment moderation by clicking on that check button.

On the Comment Moderation Page :

Below screenshot is from the comment moderation page on the WordPress dashboard. Now we can moderate all the comments using the simple Keyboard shortcuts -

below is the list of short cut keys -

[table border=”1″]
Key,Purpose
A,Approve the comment
S,Mark the comment as spam
D,Deletes the comment
Z,Restores the comment
U,Unapproves the comment and putting it back into moderation
R,Reply to the comment (Hit Esc to cancel the reply)
Q,Activates Quick Edit for inline editing of the comment
[/table]

If you want to handle multiple comments then x key can be used to check the check box for the currently selected comment. Shift-X can be used to toggle the check boxes, inverting their state. Once you have some comments checked there are also bulk actions.

[table border=”1″]
Key,Purpose
Shift + A,Approves the checked comments
Shift + S,Marks the checked comments as spam
Shift + D,Deletes the checked comments
Shift + U,Unapproves the checked comments
Shift + T,Moves the checked comments to the Trash
Shift + Z,Restores the check comments from the Trash
[/table]

How to Change Your Display Name on WordPress Blog ?

Whenever article is published then on the archive or blog page, inside the meta information default author name is displayed. Author name is user name for that WordPress installation.

In order to hide this information from the blog readers it is necessary to change the display name of the User. Keeping display name and user name same will make task easier for the attackers or hackers.

Changing the Display name :

We can change the display name by going in the Users -> Your Profile

Now click on the dropdown labeled “Display name publicly as” and select your full name or suitable name you want to display -


WordPress will automatically analyze the different combination of display name based on your username,first name and last name.

How to remove Visual Editor Mode in WordPress ?

WordPress after installation will provide us two modes for writing post. One mode is as usual HTML window in which we write code in plain HTML.

In the visual mode we have WYSIWYG post editor where we have ability to design post using the visual tools.

After doing some formatting work in the Visual editor when user switch back to the normal HTML mode then much of the formatting will be lost. In order to prevent the loss of formatting we are disabling the visual editor in WordPress.

How to Remove the Visual Editor Mode ?

Basically our main motive is to disable Visual Editor mode and when user creates new post we should see HTML editor by default -

You need to go to Users > Your Profile, there you will see something that looks like the image below :

Just check the option in front of the visual mode and save it. Now we can verify it by creating the new post -


We are able to land on the HTML editor mode while creating the new post in WordPress.

What is WordPress ?

WordPress is a free and open source blogging platform used as content-management system. It is based on the PHP and MySQL database. WordPress can run on the web hosting server such as Bluehost, Dreamhost, Hostgator.

What we can do with WordPress ?

  1. WordPress can be used for Managing articles
  2. WordPress can be used for Blogging i.e to share knowledge
  3. WordPress can be used for verity of applications such as E-learning tool or for E-Commerce using its template and plugin architecture.
  4. WordPress can be used for

According to Wikipedia, WordPress is used by more than 18.9% of the top 10 million websites as of August 2013.

WordPress is the most popular blogging system in use on the Web.At present more than 60 million websites are using WordPress.

[table border=”1″]
Developer(s),WordPress Foundation
Initial release,27 May 2003
Development status,Active
Operating system,Cross-platform
Platform,PHP
Type,Blog software
License,GNU
Website,wordpress.org
[/table]

Market Share of WordPress Compared to Other Blogging Platforms :