Pictures Cannot be Published to WordPress using Windows Live Writer

We tried to upload an article to remote website with some pictures in the content. The article edited in Windows Live Writer. The website is a WordPress site and the version is 3.1.3.

However, we got an popup error message windows indicates Picture Upload Not Support By Blog as title and pictures can not be published.

The error windows also provides solution: Windows Live Writer can be configured to publish pictures to an FTP account. Do you want to configure an FTP account for picture publishing now?upImgFailed00

Actually, This issue is not about any FTP stuff. It is because some settings on your WordPress blog are not correct.

Login to your admin control dashboard. Go to “Settings”, click “Media”, we found we put a Store uploads folder for uploading files. actually, we should not input anything here, because the default folder works always well, it is wp-content/uploads.


So the solution is just remove the folder setting so that let the blog uses default folder.

Upgrade WordPress Got Trouble: Admin Blank Page

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.


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


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 !

Updated to WordPress 3.1.3

We have used WordPress 2.7.1 long time. It was stable because we do not have extra features needed. We updated to WordPress 3.1.3 just because we do not want to miss too much but should follow WordPress new version.

Most of stuff looks OK after we updated, the only one problem was the database backup plugin did not work well, but it was not big trouble, we just tried to update the plugin first, and it still could not work, we then deleted it and install again, then everything is OK.


Add Google AdSense into Top Wide Sidebar in WordPress Suffusion Theme

To add a Google AdSense adv into top wide sidebar area in WordPress suffusion theme. You have different solutions.

Here we list 2 solutions:

1: Using Widget:

Go to WordPress admin panel,  Appearance->Widgets

You can see Wide Sidebar (Top) on right side, drag a Text widget into it.


Click the right triangle on the text widget to expand it, insert your Google Adsense code into the text area:


Save it. Then you will see your Google Adsense adv shown at the top wide sidebar area.

2: Modify file manually:

If you use widget, you will find there is a wrap box outside of your AdSense ads. If you don’t like this box, suffusion theme does not provide an option to remove it.

So we have to find a way to remove it: change file.

The file which you can select might not be only one, here we select the file actions.php, and for our case, we want to add an ads to top right side in sidebar’s area.

opent actions.php and locate the function “suffusion_print_right_sidebars()”, find the following code:

// Show Wide Sidebar Top if there are 2 right sidebars
if ($right_count == 2) { echo "<div id='sidebar-wrap' class='sidebar-wrap sidebar-wrap-right fix'>"; if (!suffusion_is_sidebar_empty(18)) { suffusion_print_sidebar(18, 'wsidebar-top', 'Wide Sidebar (Top)', $suf_wa_wst_style, 'right'); } }

Then add your AdSense code right after above code, for better layout, you might need to add <div></div> to wrap your AdSense code:

div align="center"> your adsense code here </div>


After you add your AdSense code, you have to adjust your Siderbar’s width to match the width of your AdSense.

You have to adjust 2 places for the width:

1: Menu “Other Graphical Elements” –> “Other Graphical Elements”


Scroll down and find “Sidebar Width Settings”, you can change sidebar1 and sidebar2 width here. The width settings reflect to single page’s sidebars

2: Menu “Template” –> “Double Right Sidebars”:

you also should change the width for double right sidebars here. the width settings here reflect to home page’s sidebars

Record Alexa Rank 2011 June 05

Let a website traffic rank up is hard. Almost 9 months passed again. The traffic rank in Alexa record is still 1,610,695, The last record was in 2010 Sep, the rank was 3,737,552.

Actually I know some reasons why rank up is slow, the content, the direction, the idea, the writing skill, the English…

I need a professional site…

Suffusion theme skills

We posted “Basic Settings of WordPress Suffusion theme”. Now we will share some skills which we learnt. Maybe they are simple, but maybe you don’t know.

1: Header Background Image height ?

You might have added a image for your header background, but you meet a trouble that you have already set the image height, but the header part looks like not work well, or maybe you see the are more space under your header.

All the height trouble come from you actually did not set a correct height for your header background image height.

Please read their description for Height of the Header image:

… you can change this setting if you have a header image needs to fit. Note that both above and below the header is 15px of padding, making the effective height of the header 85px.


So if your header image is 55px high, actually your header section height will be 55px + 15px + 15px = 85px, so here you should fill a number which is your exact image height minus 30px, or even you can minus more so that you can get a perfect header height and space between header and main content.

2: Problem when modify Single.php

If you want to change something in Single.php file, and if you want to modify this file in WordPress management dashboard, you will meet a problem which you must be confused by it: you changed something, but you will never get the correct result.

The reason is this Single.php file which you are modifying is NOT the Single.php which you want to modify. this file you are working is located in the folder “now-reading” but not in the folder suffusion.


The simple solution is that just cut off “now-reading/” from URL which in the top URL place in your web browser, then click Enter, you will see the exact Single.php file which you want.

3: Add a “XX Views” for each post:

Want a views number for each post like following ?


Install a view plugin which is able to enable the function the_views(), such as the plugin WP-PostViews.

Go to Suffusion theme folder and find a file named “actions.php”, or you can find it in your WordPress admin panel Editor.

open this file, located a function “suffusion_post_footer()”, find a place which you want and insert the following code:

   1:  <!-- my code begin -->
   2:  <span><?php if(function_exists('the_views')) { the_views(); } ?></span>
   3:  <!-- my code end –>

4: Insert Google AdSense between excerpt posts in Home page:

Insert a AdSense block between post block in Home page just like below:


Find layout-blog.php file and open it, locate the following code:

   1:  global $post;
   2:  if (have_posts()) {
   3:      $full_content_post_counter = 0;
   4:      $full_post_count = suffusion_get_full_content_count();
   5:      while (have_posts()) {
   6:          the_post();

Followed the above code, insert your AdSense code block, but you have to add php script also, check following sample code:

   1:  //My code start
   2:  if ($wp_query->current_post == 1 ) {
   3:  ?>
   5:  <!-- your AdSense code here -->
   7:  <?php
   8:  }
   9:  //My code End

Basic Settings of WordPress Suffusion theme

Suffusion theme is one of popular WordPress themes, it is much more robust than other free WordPress themes. And also, it actually is not a single theme, it provides multiple themes.  However, you will feel hard to use it if you never used it before.

I am a new Suffusion user too. So let me record some simple settings which let me recall latter:

1: Select a theme skin:

I am using Suffusion 3.7.8, Suffusion provides 19 different skins in this version. So choose one which you like, Actually the default one in more popular and nice.


2: Choose a Sidebar Style:

Go to “Sidebar Configuration” and “Sidebar Layout”:


Scroll down the screen, you will see “How many Sidebar” section, here you can set a single sidebar or two sidebars in you blog, and set the sidebar’s location on the page, for example: both two sidebars are on right side,  or on left and right…etc..


3: Select a template:

Set the template due to your blog page layout, for example, if you choose double right sidebars, you should set something for double right sidebars in here.


4: Adjust Header and Description alignment:

Go back to “Theme Skinning” menu and select “Header” tab:


If you want your settings work, please make sure you have changed default option to custom option:suffusion03

Save it and your settings will work.

5: Set only excerpt shown on Home page:

Go to “Other Graphical Elements” and choose “Layout: Except/list/Tile/Full” tab. change each option from “Display full content” to “Display excerpts”


6: Top Menu:

By default Suffusion theme hidden top menu, change settings as following for showing top menus:

Select menu “Other Graphical Elements”, click “Top Navigation Bar”:


Scroll down to Show Home Page section, select option to show Home menu if you want.


If you want to show other page as menu, select options as following settings.


Using WebMatrix to build a WordPress Site 2 of 2

After you finished installation PHP, MySQL and WordPress (see part 1), you will come to WebMatrix user interface with your new WordPress site:


Now you can run your website: select the “Run” button on the top and choose a browser which you like. Then the WordPress site will run at the first time:


For the first time to run WordPress site, you will have to set a site Administrator:


After you input Administrator information, and click “Install WordPress”, the WordPress will set initial stuff for your WordPress site, and finally you will see your site default face like below:


Now you can just set all things just like you set without WebMatrix before, because these settings just finished through web browser. For example, you can change Theme using web browser.

Of course, if you want to change your theme’s code, you can use WebMatrix:

Select the “File” on the left panel, and choose your file to edit:


Publish your WordPress site to Remote Hosting:

Another important feature of WebMatrix is that publish sites:


When you select Publish, you have to choose publish protocal type and input related information:



You have to choose Protocol type due to your hosting’s service, maybe your hosting only support FTP, so you have to choose FTP protocol. and you have to know FTP doesn’t support you transfer your database to hosting, FTP only support file transfer to hosting. If you want to transfer files and database, you have to choose “Web Deploy” protocol.

About Connection String: connection string like the following :


(The End)

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


   1:  <!-- my code start -->
   2:  <br />
   3:  <div>
   4:  <br />
   5:  <span class="postcomment">
   6:  <?php
   7:  /list 5 post titles related to first tag on current post
   8:  $tags = wp_get_post_tags($post->ID);
   9:  if ($tags) {
  10:  ?>
  11:  <h3><?php _e('Related Posts', 'f2') ?> </h3>
  12:  <?php
  13:   $first_tag = $tags[0]->term_id;
  14:   $args=array(
  15:   'tag__in' => array($first_tag),
  16:   'post__not_in' => array($post->ID),
  17:   'showposts'=>5,
  18:   'caller_get_posts'=>1
  19:   );
  20:   $my_query = new WP_Query($args);
  21:   if( $my_query->have_posts() ) {
  22:   while ($my_query->have_posts()) : $my_query->the_post(); ?>
  23:   <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  24:  <?php the_title(); ?></a></h4>
  25:   <?php
  26:   endwhile;
  27:   }
  28:  }
  29:  ?></span>
  30:  </div>
  31:  <!-- my code end -->

Using WebMatrix to build a WordPress Site 1 of 2

What is WebMatrix? OK, it is Microsoft WebMatrix. So What is Microsoft WebMatrix then?

If you don’t know please just read the explanation from Microsoft:

WebMatrix is a free web development tool from Microsoft that includes everything you need for website development. Start from open source web applications, built-in web templates or just start writing code yourself. It’s all-inclusive, simple and best of all free. Developing websites has never been easier.

Why we recommended WebMatrix because this tool is not like Microsoft’s other tools such as Visual Studio which is only for Microsoft’s product or platform, WebMatrix is a kind of IDE tool which is not focus on some specified platform. You can use it to build a WordPress site, a Joomla site, a Drupal site and also DotNetNuke and web sites. It can get all popular open source system and let you build your site based on them.

Here we try to use Webmatrix to build a WordPress site:

1: Open WebMatrix, and choose “Site From Web Gallery”


2: Choose “WordPress” and input your Site Name:


3: If you don’t have a MySQL installed on your computer yet, WebMatrix will ask you to install a MySQL database, we choose it install MySQL on our machine:


4: Input the administrator’s password for the database (you can see the default user name is root):


5: Matrix will install WordPress and PHP and also you have to accept EULA:


6: Matrix will download and install MySQL, PHP and WordPress for you now:

(You can see some information such as : Install PHP for Matrix, install MySQL connector/Net 6.2.3…)


(Actually when we installed MySQL in this step, we got a stuck in this step, the MySQL installation won’t go ahead, we waited long time and finally we had to cancel the install and went to Windows control panel to uninstall all MySQL stuff which have been installed finished), We don’t know whether it is a bug of WebMatrix or not. After we uninstall, for more install clear, we also rebooted our Windows 7. Fortunately the second installation we passed this step)

7: After the last step installation, We now need to create a database for WordPress. We keep all default setting but input our database passwords:


In this step you have to input 2 passwords: the first password is for database User name, the User is “wordpressuser” here, the second password is root’s password which you have set in Step 4;

Also, Please DO NOT forget to scroll down on this page, there are 4 more items you’d better fill:


You can input any string by yourself, or, the better is choosing security key generator from to generate to you.

Then we got another screen to indicate WordPress is installing:


8: Later we got the following screen which tell us what software installed successfully and what software installed failed:


We see our MySQL Windows 5.1 still installed failed because security settings. We then check the Installer Log and find help through that Get Help link. Finally we recognized the reason should be that we have installed MySQL in above Step 6, even we have uninstalled, but “only the binaries gets uninstalled from your machine. The database created remains in fact. ”(Please check the files in C:\Program Files\MySQL\MySQL Server 5.1), and check the similar case from this article;

That means: we do not need to be worried about the MySQL install failed message. our MySQL has already there, it has been installed successfully.

For confirm this, let us to try to run something in MySQL:

Go to start and find MySQL, and run MySQL Command Line Client


After input database password, please input MySQL command: Show Databases;

You can see our wordpress database has already there:


OK, our installation part done.