How to Generate Post Meta Keywords and Meta Description Without Plugin in WordPress

Meta keywords and Meta description are 2 important elements in SEO. By default, WordPress does not provide Meta keywords and description for single post. Some users just manually add meta information or use plugins.

If you are a blogger who does not like to use too many plugins and you want to do more modifications by yourself. you can try to copy the following code directly then put it into the section of <head> of Header.php file, if you can find other meta lines, just put the code right after those meta information lines:

Continue reading “How to Generate Post Meta Keywords and Meta Description Without Plugin in WordPress”

Updating WordPress

If your site is based on WordPress, the one of maintain tasks is updating WordPress since their new versions released time to time.

When we write this updating blog, the latest stable WordPress version is 3.1.3 .

First of First, read the warning from WordPress official site:

WARNING: The upgrade process will affect all files and folders included in the main WordPress installation. This includes all the core files used to run WordPress, two plugins (Akismet and Hello Dolly) and one theme (Twenty Ten). If you have made any modifications to those files, your changes will be lost.

The following content is our all steps which we update our WordPress site:

1: First thing you have to check whether your hosting environment support the latest WordPress version. for example: Does your PHP support latest WordPress? Does your MySQL support latest WordPress too?

“The requirements have changed as of WordPress 3.2. The minimum requirements for WordPress 3.1 are PHP 4.3 and MySQL 4.1.2. ”

But anyway, We recommended you use PHP version 5.2.4 or greater and MySQL version 5.0 or greater.

The following is a hosting provider’s environment:

wpUp00wpUp01

OK, if you have confirmed your hosting environment is qualified to update WordPress, then we start to do updating now:

2: Backup our website:

There are 2 parts in this step: backup site files and backup database.

Use FTP client tools to copy all files on online hosting to our local computer. If possible please copy live files to multiple local places for more safety. WordPress recommended: “Remember, keep at least three backups on file, just in case one is corrupted or lost, and store them in different places and on different mediums, like CD, DVD, different hard drives, etc.”

Then backup database. But before you take the action to backup database, you better to clean your database firstly, for example: delete all garbage and spam comments, delete all data which you don’t need any more.

If you have a database backup plugin installed on your WordPress, you might have already backup the database period. But you still need to backup the newest database, so maybe the best way is go to your hosting account and use their database management tool such as the most popular tool PHPMyAdmin.

In home windows of PHPMyAdmin , check on all tables, and click “Export” on the top. then you get the following screen, here we post our database backup selections screen shot below:

wpUp02

check on all options which you like, and give a file name, then click Go button. you will get a database .sql file which a popup windows asks you save to somewhere:

wpUp03

Now you get your database backup file.

About how to use PHPMyAdmin to backup the database, you can please to find the detail from internet, there are huge information about the usage; or you can follow WordPress’s database backup guide.

3: Disable Plugins:

Simple words here: Just login to your WordPress management and deactivate all plugins which you have activated.

4: Updating:

After WordPress 2.7+, There are 2 updating methods which we can use: automatically update and manually update.

The automatically update will work for most of users as long as you did not change the WordPress core files. and it is more easier and faster.

But, if you can not make sure, please use Manually update. please follow WordPress guide to do it.

Go to Dashboard tab and see the following screen shot:

wpUp04

You can click either the top “Please update now” or lower button “Update to 3.1.x”

Then you come to WordPress updates window, you will see automatically update button and download button (for manually update), and also WordPress check plugins and theme updates, if there are new releases, it asks you update them.

wpUp05

Finally you will see the updating result:

wpUp06

Our WordPress updated successfully. How about yours ?

WordPress Related Posts without Plugins

Add Related Posts section in your article is nice for your article reader.

The easy way is to find a plugin to install. and set a little bit to get it.

Here we have another solution, maybe you do not want to install too much plugins in your blog. So you have to change code by yourself.

Open WordPress theme’s single post template. In proper location which you think is good , to paste the following code (you might have to change some code due to your theme and requirement):

<!-- my code start -->
<br />
<div>
<br />
<span class="postcomment">
<?php
//list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
?>
<h3><?php _e('Related Posts', 'f2') ?> </h3>
<?php
 $first_tag = $tags[0]->term_id;
 $args=array(
 'tag__in' => array($first_tag),
 'post__not_in' => array($post->ID),
 'showposts'=>5,
 'caller_get_posts'=>1
 );
 $my_query = new WP_Query($args);
 if( $my_query->have_posts() ) {
 while ($my_query->have_posts()) : $my_query->the_post(); ?>
 <h4><a href="&lt;?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?></a></h4>
 <?php
 endwhile;
 }
}
?></span>
</div>
<!-- my code end -->