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.

WP Cache – Speed Up Your Blog Pages Loading

If you have problem with hosting service or your wordpress blog has taken lots of time for loading, perhaps you can consider to install WP Cache wordpress plugin to generate static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.

My web hosting is quite reliable,so far I don’t think I will need this plugin at this moment. If you need to speed up the loading of your blog and your blog always hit Digg.com’s frontpage, then you are encourage to activate this plugin.

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

How to Exclude Certain Categories

There are 2 ways to exclude certain categories from your blog, one is use wordpress plugin named Advanced Category Excluder. This plugin was born because there was a no other real alternative to enable content sparationd and some CMS like functionalities in WordPress. The main goal was, to enhance WordPress’s functionalities, to hide some unwanted categories, from defined parts of the blog.

The alternative way is without plugin, you can add the below code inside the loop then it will work.

<?php
if ( have_posts() ) : query_posts($query_string .'&cat=-1,-2'); while ( have_posts() ) : the_post();
?>

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.

How to Highlight Author’s Comments

There are 2 ways to highlight author’s comments, one is use highlight author comments wordpress plugin, another idea is without wordpress plugin. If you don’t want to use wordpress plugin to highlight author’s comment, you can follow the below few simple steps.

First, you need to open styles.css and add the following into this file.

.authorstyle { background-color: #B3FFCC !important; }

Second, open comments.php, find and locate the following code.

<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"></li>

And then replace with

<li class="<?php if ($comment->user_id == 1) $oddcomment = "authorstyle"; echo $oddcomment; ?>"></li>

Please note that you must change 1 to the user id of the author. Thanks to Matt Cutts for this tutorial.