How to Backup and Restore WordPress Database

Please keep in mind that you need to backup your wordpress database periodically to prevent your data lose in case of bad plugin installation or an attack by hacker. So do you know how to backup and restore your wordpress database? If you don’t, let me show you how.

DISCLAIMER: I will not going to hold responsible in any way should you encounter problems like loss of database and entire blog/website along the way. It worked excellently well for me.

How to Backup Your WordPress Database

1. Download and install WordPress Database Plugin and active this plugin.

2. In your wordpress dashboard, go to Tools > Backup

3. Under Backup Options, select “Download to your computer” and click on “Backup Now” button.

How to Restore Your WordPress Database

1. Log into your FTP account and delete everything in the /wp-content/cache directory.

2. Log into PHP MyAdmin and select your wordpress database.

3. A list of all of the tables contained in the database will be shown. Select all the tables and select the Drop option to delete them permanently.

4. After wordpress database is empty, it is time to upload your database by clicking Import tab.

5. Locate of the text file and then click “Go” button to import your wordpress database.

TwiBadge – Show Your Twitter Badge with Easy Personalization

TwiBadge is a wordpress plugin to show your Twitter badge with easy personalization, it display all your tweets and replies from twitter.com/home. Apart from that, this plugin also came with a “follow” button which allows visitor to follow on your twitter.

Below is some features of this plugin:-

  • Integrate Twitter and WordPress seamlessly
  • Show Twitter badge as a WordPress widget
  • Support flash interactive widget
  • Easy personalization, no coding knowledge is needed
  • Support shortcode
  • Support non-widget theme

Image Caption – Put Caption Under Your Images

If you want to put the caption under your images, then you can make use of Image Caption wordpress plugin. This plugin extracts the title or alt attribute from images within your blog post and generates a neat caption directly underneath those images. Apart from that, it also supports custom CSS styling for captions.

My Page Order – Allows You Arrange The Order of Your Static Pages

You can set the order of the pages for wordpress, the order of the pages are sorted by ascending. If you want to control the order of how things are displayed for pages, you can use My Page Order wordpress plugin. How does it work? This plugin gives you a simple interface that allows you to arrange the order of your static pages. It uses and sets the same field in the database as WP does so if you have set an order before it will be preserved.

How to Display Recent Comments Without a WordPress Plugin

Get Recent Comment wordpress plugin shows excerpts of the latest comments, it also can (optionally) separate the trackbacks/pingbacks from the comments.

If you don’t want to use any wordpress plugin to display recent comments, you can copy the following coding and paste it to the sidebar.php file. To change the number of displayed comments, simply change the LIMIT “10″ to your desired number.

<?php
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT 10";
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
$output .= "\n<ul>";
foreach ($comments as $comment) {
$output .= "\n<li>".strip_tags($comment->comment_author)
.":" . "<a href=\"" . get_permalink($comment->ID) .
"#comment-" . $comment->comment_ID . "\" title=\"on " .
$comment->post_title . "\">" . strip_tags($comment->com_excerpt)
."</a></li>";
}
$output .= "\n</ul>";
$output .= $post_HTML;
echo $output;?>

Thanks to WPHacks for this awesome coding.

Hotlink Protection – Protect Your Images Being Hotlink in Other Places

No people like their images of their blogs being hotlink in other places, because this will increase your bandwidth usage and slow down the speed of your blog. In order to avoid your images being hotlink by other people, you can use Hotlink Protection wordpress plugin to protect it.

How It Works

  • Referrer check if someone requests an image from your blog. If the referrer is not empty and not your blog the request is redirected to an information image
  • The image urls in the feed are replaced by an alternate url. This url is not protected by a referrer check so online feedreaders get the image

What It Not Does

  • It doesn’t protect the images in the feed. So hotlinking the image urls from the feed is possible. But in my opinion it is nearly impossible to protect this images without breaking some online feedreaders.
  • It doesn’t prevent someone from downloading your images and placing them on their own webspace