Category Archives: Site Info

Moved domain registrar from bluehost to godaddy

Followed this instruction move away from bluehost; and move domain into godaddy. Most instructions are accurate, except one needs to ping pong couple times, started from bluehost first, then at godaddy website, after that I received email from godaddy asking about the transfer, go ahead and use the information in the email to start the official transfer, at last I go to bluehost website and approved the transfer. The interesting part is the entry of name server on my web host (digitalocean) gets updated automatically once I approved the transfer by clicking the link on bluehost. This really surprised me as I was expecting to make changes manually on my own :-)

You may ask why I bother to transfer? I have actually moved my web hosting from bluehost to digitalocean (shared host to dedicated hosting) a while ago. This is the last step before moving completely away from the bluehost. No ill feeling towards bluehost (although couple years ago it did give me some headache). It’s just the cost between the two are comparable and I like to have more say on the web hosting.

Last but not least, if you have Amex card, check if you have the godaddy $20 off $50 offer. I found it from one of my Amex card, and I used it for domain transfer ($9.99 x 5 years plus a bit tax/fees). So the total will be about $30 after Amex offer. :-)

Moving wordpress from shared host to aws ec2

I did an experiment recently trying to move my wordpress website from a shared hosting site to Amazon aws ec2 micro instance (t1). The migration was mostly successful, I did not make the move eventually due to some technical and non-technical reasons. Nonetheless, I would like to share some of the lesson I learned from this process. I followed this blog post form smashmagazine as a blueprint for “moving wordpress”. Note I already have ubuntu installed on ec2, and has setup keys for my laptop.

1) Setup wordpress on new host. This is the link I followed to setup wordpress on ubuntu on my aws ec2. Another useful article is here.

2) Upload files: I used FileZilla (SFTP) for uploading the files. Here is the link regarding setup keys. Note the file permission is also very important to make wordpress work, which is especially important when moving the sites. More on this later.

3) File permission, one thing I noticed quickly is I don’t have any writing privilege after moving, e.g., update plug-ins etc. Did google quite a bit, and tries to change the file permissions using FileZilla. No luck. Eventually I read this from wordpress official doc. Quote:…(a) file ownership: all of your WordPress files must be owned by the user under which your web server executes. In other words, the owner of your WordPress files must match the user under which your web server executes. The web server user (e.g., “apache”, “web”, “www”, “nobody”, etc.) is not necessarily the owner of your WordPress files…

I did “ps -ef|grep httpd” at my ubuntu server, and find the user for apache web server (not “root”). And changed the file owner to this user (via “chown” command).

4) MySQL server crash: I found this happens quite often (as often as once every 3 days). Turns out to be a memory problem for the t1 micro instance and apache web server and mysql fights for the memory, eventually mysql lost. The solution I found is add virtual memory to the system, and reduce the memory requirement for mysql in config file. Eventually I was able to have mysql run as long as 13 days without shutting down. Not ideal, but still meaningful improvement (13 days uptime vs 3). Another idea, people talked about is use a lightweight http server such as this one.

5) MySQL database migration. Found out for large database, php export will not complete, and will end up with some junk html in the database file (.sql), it will fail during import. The workaround is do the export and import in the mysql command line. But I still have one problem with database, it appears the Chinese character got lost during this process. This problem along with the mysql server problem mentioned above, and the relative higher cost of AWS compared to shared host, made me decide to not switch at this time.

Other links:
Setup php/mysql, and phpMyAdmin. was hacked and restored, plus some thoughts

I found out this site was hacked yesterday evening, as I saw the loading of site on Safari was slower than usual. It also shows incorrect theme, more like a plain theme. With the admin link redirect to spammer site. I decided to tackle it right away. I recall about one year ago something similar happened to this site, and google webmaster tool told me about it. I was able to remove the offending files/directories, by following the recommendation set out by google and some other wordpress sites.

This time I made an almost fatal mistake, during deleting some of the files in wp-includes, I accidentally deleted all the useful php files there. Panicked, I used both the website restore tool, and the import feature of wordpress (mojo marketplace), to no avail. The symptom of the problem was I could not login, and it shows blank page when I login via the wp-admin or wp-login.php after taking my credential. And I can only see the pages at (I could not log in there either).

I filed for help at the hosting company. But I still feel helpless as this site has about 9 years of my blogging and has my last 4 years of blogs. Fortunately I was able to find this wordpress help page about updating wordpress, and fix internal server error by deactivating the plug-ins. The latter comes only after I gained some web dev experience lately, knowing more about error 500 :-)

So long story short, I was able to restore all the blogs (those two plus my wife’s happy by the following:
1) Restore .htaccess file to avoid the redirect to spammer page;
2) Restoring the wp-includes and wp-admin page: upload zip file, extract; in the wp-content directory, I renamed plugin directory as plugin.SAV (this way it deactivates all the plugins);
3) Run the wordpress update as soon as I can log in.

I also backed up the MySQL databases for stlplace and uudaddy, and backed up those two blogs to (this one and this one). I understand blogging itself is a declining trend, and it’s probably not easy for small web hosting company to defend against hackers like Google/Amazon/Wordpress do. That’s why I am also evaluating whether to move to or Amazon EC2 (self hosting). It’s a bit emotional decision as I have hosted this site for 9 years, but I need to consider both my time, the cost of hosting, etc. I will make a decision on this shortly. Meanwhile check out the new blogging sites I mentioned above, in which I will blog both about software development and raising kids.

New blog theme

The loyal visitors of my blog may notice the face lift of this blog. I am using simplicity-10-widgets theme from solosteam webstudio, courtesy of Michael D. Pollock. It is fairly easy to set up but it did take me some time to upgrade my wordpress from 2.0 to 2.2, and get side bars working. I should also thank Google for helping me locate a few old pages during the process.

I believe this should help my readers to navigate the blog. Please let me know if you have any suggestions, ideas. Yes, the free gift certificate thing is still on.

solostream wordpress blog theme pic

Can not get the time right

There is an old saying “one can not teach old dog new tricks”. This exactly applied to me, I am talking about programming for my blog. More accurately, I could not get the time of this blog correct.

This blog is hosted in a hosting company at Utah (US Mountain time), and I normally live in St. Louis (US central time), that’s one hour difference from Utah. Also from time to time I visit Shanghai (Beijing time), which is 13 or 14 hours ahead of St. Louis depends on the daylight saving setting.

Continue reading

Added Related Post and Language Tools

I added “related post” functions to this blog today. Basically it will show “related posts” at the end of each article if you go to each post (by clicking on the title). Hopefully this will make navigation of this blog a bit easier. Now we have search on the side bar (search by word, search by Google), and this related post thing. I also added “save to” button at the bottom of each post.

I also added a language (translation) tool at the right side bar. You can click on the flag to get an instant translation of this blog. This is based on WordPress Global Translator Plugin.

Continue reading


I got lots of spams (spamming comments) lately. Thus I decided to use the special anti-spam program for now. If you feel your comments have been mistakenly treated as “spam”, shoot me an email and I will manually revert it.

I will also check it regularly to make sure legimate comments don’t get treated as spams.

Links (updated 042208)

I organized the links at the right side a little. Now I have the following categories. The link ends with * means you can not get access to it inside China, thanks to the GFW.

BLOG: the blogs I read often, most of them are written by my friends.

gseeker: I like this Chinese blog about google very much. The author spend lots of effort tracking what’s going on at Google: from people from google jump ship to facebook, to Google Finance stockscreener.

CHINA: China in Chinese and English, from business, economy, jobs to travel.

FINANCE: financial blogs and magazines.

MoneyCourier: it’s a Chinese blog talking about the mutual funds in China A share. Most Chinese stock or Finance blog are full of crap (talking about making fast money), this one is exception.

LINKS: I put anything else into “links” category. The topic ranges from business to life to technology.

MAJOR: my own stuff.

PRO: blogs written by professionals, i.e., money mangers, mutual fund manager, venture capitalist (VC) etc.

Zhuping: I recommend this one to you. Mr. Zhu is the VP, CIO of a major mutual fund company in China, more importantly, he talked about value investing.

Danbin: a hedging fund manager in China. He is a rare commodity in China hedging funds because he is also a value investor (at least he is talking about that all the time).

SHANGHAI: stuff about shanghai.

ST. LOUIS: stuff about Saint Louis, my current home

I will continue to refine this as times goes. Note I will remove links to “blogs” which is not active (say, not updated in last 2 months).

Added tags

I added the “tags” for this blog. There are two places you can see the “tags”: under the time in each post; the right side bar (under “tags”). So what is “tag” exactly? Using non-technical terms, tags is like “key words”. “Tag” helps organize and search the blogs.

To use it, you just simply click on the “tag”, and it will show the related articles which contains that “tag”. The “tags” cloud map in the right side bar ranks the popularity of each tag by the size of “tag”. The larger the font, the more popular it is.  

If you are really curious about how to make this work in WordPress blog, here is the link for “Ultimate Tag Warrior plug-in”.

Believe it or not, although “Google search” is so good, in lots of cases the “tags” created by human beings are much better in organizing and searching blogs. I am also including the definitions for “tags” from the blog search engine Technorati here.