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”

Upgrade and Modify CodeEase.com from 2013 Aug 21

It is the time to upgrade and modify CodeEase.com. I want to continue to use WordPress since it became Microsoft’s partner. Also Microsoft is changing, they spent more and more resources to open source. It is not bad if I using WordPress to continue my code posts.

I am still using WordPress 3.1.3 for CodeEase but current WordPress version is 3.6. so I think I ‘d better to upgrade now. also, I want some changes.

Let me record what I do for this time of upgrading and modifying.

Continue reading “Upgrade and Modify CodeEase.com from 2013 Aug 21”

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 ?

Write a source code blog using Windows Live Writer

 

This is a my first blog using Windows Live Writer 2011.

The first nice feature is I can see my preview of this article which I am writing offline. Because when I added this blog in Windows Live Writer, I was asked whether I want to download my blog theme to local so that I can see my blog preview offline.

Another feature is that I want to try whether I can set something in Windows Live Writer for computer source code. Because I have not use any plugin in my this blog site to highlight or border computer source code.

OK, let me try to find something here…

Unfortunately I got nothing using Windows Live Writer directly, I think I have to use Plug-in, OK, I see the “Plug-in” button on the top when you select “Insert” menu:

WinWriter00

Just click the “Add plug-in” button, and you will open a webpage: it is a Windows Live Writer plug-in list page

We just choose a code plugin which the download rate is high. I choose this one: Insert Code for Windows Live Writer

Download it an install, and save current article on local , re-start Windows Live Writer.. OK, when you select insert menu, you can see there is a new button there, Insert Code:

WinWriter01

 

            foreach (TrendingCfgPoint cfgPoint in selectedTrendingCfgGrp.TrendingCfgPointList)
            {
                TrendingObject tObj = new TrendingObject();

                tObj.SysPointInfo.HostDBIndex = cfgPoint.HostDBIndex;
                tObj.SysPointInfo.Number = cfgPoint.PointNumber;
                tObj.DisplayOrder = cfgPoint.ShowIndex;
                tObj.LineColor = cfgPoint.LineColor;
                tObj.LineWidth = cfgPoint.LineWidth;

                TrendingObjectList.Add(tObj);
            }

You can see there are many red underlines in the source code which mean they are error code, actually I do not want to the error lines display.

But don’t worry , when you publish your post, the red lines will gone automatically.

OK, I finished my first post with computer source code using Windows Live Writer.