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”

Website Updated

We updated CodeEase.com due to new technologies and new devices. More and more people are using mobile devices now, some people will never use computer then, so the website should follow the new times.

The old face of CodeEase.com was the following one, It was OK for any computers, but might not perfect for cell phone.

image

Good Bye, old CodeEase face !

Changed Theme for New Platforms

We changed site theme in last weekend, just for new platforms such as mobile, tablets. Because there are not only desktop and laptop in current world.

Actually we are waiting for better theme so that we can modify theme to our own style. Current theme is not enough perfect for new platforms.

Links about First Load Web App on IIS

If you used IIS server or Windows Hosting, you might know an annoying problem that if your website not be visited for while, the next visiting needs longer loading time, you have to wait up to over 60 seconds if your hosting is not good. This is because IIS has a feature for low traffic websites it recycles unused worker processes.

Continue reading “Links about First Load Web App on IIS”

Release Physical Disk Space After Deleting MySql Table

(This article actually copied from our sister website)

Our WordPress blog sites always got countless junk comments, this caused our MySql data table large size.

We could delete junk comments if we have not installed plugin such as Akismet to protect our site from spam in WordPress Admin Dashboard, but we might have to delete the comment one by one so very slow, or, we use another “rude” way, delete records from comments table.

Continue reading “Release Physical Disk Space After Deleting MySql Table”

WordPress Arras Theme Widget Fatal Error When Update

When we tried to update a WordPress blog website which from version 3.0.1 to version 3.7.1, we got trouble – a Fatal error.

Fatal error: Call to undefined method Arras_Widget_Tag_Cloud::WP_Widget_Tag_Cloud() in /home/….xxx.com/xxxxxx/wp-content/themes/arras/library/widgets.php on line 404

You can see that we had a mistake when we updated the WordPress site, we did not change the theme to default theme, but still using a 3rd party theme named Arras. Obviously the error caused by Arras theme.

Continue reading “WordPress Arras Theme Widget Fatal Error When Update”

Upgrade WordPress Got Trouble: Admin Blank Page

This article was published on our brother website: GoGoToTo.com, We copied it to here because we think it is very important for most of WordPress site owners.

We tried to upgrade a WordPress site from 2.8.x (maybe 2.8.4) to 3.1.3 with upgrade automatically.

Before we upgrade, we have deactivate all plugins. But after we click “upgrade automatically”, first we got a error message screen:

“Briefly unavailable for scheduled maintenance. Check back in a minute.”

After some while, we found our site can be visited without problem, but when we try to login Admin, the Admin show a complete blank page.

wpUpgradefail00_0

We searched related information in the internet, most of cases indicates the temporary file named .maintenance in the blog base folder, if you delete this file, your blog should be ok then.

Note: You have to make sure your FTP tool allows display hidden files, otherwise you can not see the .maintenance file.

Just check WordPress official help information about this:

How to clear the "Briefly unavailable for scheduled maintenance" message after doing automatic upgrade?

As part of the automatic upgrade WordPress places a file named .maintenance in the blog base folder (folder that contains the wp-admin folder). If that file exists, then vistors will see the message Briefly unavailable for scheduled maintenance. Check back in a minute.

To stop that message from being displayed to vistors, just delete the .maintenance file. The automatic upgrade should be executed again, just in case it failed.

However, for our case, we did not need to remove .maintenance file, and the site could be visited ok after short while. But the new problem was: The Admin page became a blank page.

Then we searched info about Admin blank page and spent long time, we tried all solutions which we could find, for example:

1: Deactivate all plugins without admin login, please followed WordPress help information like the following:

via FTP

Create an empty plugins folder
Via FTP or your host’s control panel, navigate to the wp-contents folder (directory)
Via FTP or your host’s control panel, rename the folder "plugins" to "plugins.hold"
Via FTP or your host’s control panel, create new folder called "plugins"
Login to your WordPress administration menus
Via FTP or your host’s control panel, delete the empty "plugins" you previous created
Via FTP or your host’s control panel, rename "plugins.hold" back to "plugins"

2: Remove extra space at the end of wp-config file, and also at the beginning of the file;

3: Remove extra space at the end and beginning of a file named “functions.php”. the file located in theme folder, some people said located in wp-includes folder.

But anyway, what ever we changed which files, we still ONLY got an blank Admin page.

4: Later we found a case from internet: If want to deactivate all plugins, sometimes IT DOESN’T WORK if only change plugins folder name, but need to change database:

Then we go back to WordPress help information here and choose the “phpMyAdmin” way. wen to our site’s online database control panel, and use phpMyAdmin to change data in datatable wp_options table.

However, we found the data in the column option_value field has been already “a:0:{}”, which means no plugin activated now. Because before we started to upgrade, we have already deactivated all plugins that we have installed.

So, our case is really different with above all cases, and different with most of cases which descripted in internet.

So what’s wrong with our WordPress site?

Finally we found our solution and upgraded successfully ! please read the procedure which we did:

We think since our site still can be visited without any problem, and we have known all known solutions in internet are different with our case. so we’d better think about the exact reason for our case;

Our site could be visited all the time but only admin was not correct, so we thought why we did not just replace Admin folder with backup folder ? (so now you know the backup is so important before you upgrade your WordPress site).

1: Then we change the wp-admin foler name to wp-admin_bak, use FTP tool to upload our backup wp-admin folder to online site.

Bingo! now we found our Admin can be accessed and can be logged in ! and also our site still visit correctly.

2: The dashboard still show the 2.8.4 version and gives information to upgrade. And also we made sure all plugins were deactivated.

But, this time we did another thing: we changed theme to default theme which WordPress provided. Not sure this step is required or not. but we just did it.

3: We used automatically upgraded again. … But, We still got the same error:

“Briefly unavailable for scheduled maintenance. Check back in a minute.”

4: OK, we did not have other choice, since it asked that we should at least wait a minute, then why we do not wait? Then we left away to read news, to watch TV …

5: About 30 minutes later we came back, the error screen was still there, when we tried to refresh screen, it asked if refresh, something might have be restarted, but we were using Chrome browser, we think the prompt message should be from Chrome browser. Then we changed the URL in browser to www.oursitesdomain.com/wp-admin and click enter key…

7: Bingo! Now we got another message (no more a blank screen !! ) which indicated the upgraded process did not upgrade database successfully (or completely, we can not remember exact message.) Do you want to upgrade database ?

Yes, sure! We selected upgrading database automatically.

8: Then finally we got a dashboard screen like the following:

wpUpgradefail00

You can see the WordPress version is already the newest version, but just there was a message on the top indicated: An automated WordPress update has failed to complete, please attempt the update again now. We then clicked the update again now link. Then everything showing OK finally.

We got our site back. This is our case, it is really different with most of known case in the internet. We were lucky.

Let us remind you again: DO backup files and database before you upgrade anything !

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 -->