Move WordPress from Share Hosting to DigitalOcean

I decided to give cloud server another try, after my failed attempt to move WordPress from shared hosting to Amazon AWS last year. This time I go with DigitalOcean as I heard good things from my friend Don (who made this cool makeyourcase site and api).

Decision choosing Apache or Nginx
I chose Nginx over Apache due to 2 reasons:
1) I had fairly bad experience running Apache web server on Amazon tc2 micro instance last year. It was fighting for resources with MySQL server;
2) I saw Nginx getting popular recently. And it must have its own strength (performance, scale better). Did read Apache vs Nginx: Practical Considerations.

Some tips and tricks
1) Need to fix the extension for php in nginx setting. Follow this instruction will help, for php the key is the location setting below:

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

2) I found again I could not update the plugins after the move, found again this is due to file permission problem. After I grant the correct file permission to wp-content folder, it appears update plugin fine (kebo twitter plugin). Actually the initial problem was the twitter feed was not showing, which leads me to the plugin update. In the process I also changed the twitter feed.

3) A related problem is I went to this maintenance page, after I started updating a bunch of plugins. It appears stopped at the “related post” plugin.

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

The fix was to delete the .maintenance file in the website root folder (refer to this thread at wordpress site)

Useful links
How To Install WordPress with Nginx on Ubuntu 14.04

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04

Virtual host
How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 14.04 LTS

Host name (DNS)
How To Set Up a Host Name with DigitalOcean

How To Migrate WordPress from Shared Hosting to a Cloud Server with Zero Downtime

Ubuntu initial setup
Initial Server Setup with Ubuntu 14.04

Additional Recommended Steps for New Ubuntu 14.04 Servers (think security :-)

How To Add Swap on Ubuntu 12.04

In general, I think those articles/tutorials above made the job of newbie’s much easier. For me personally I have some UNIX/Linux/Mac experience (and concept), but I’ve never done system admin job full time. Those instructions made my life much easier.

Overall impression 

I spent about total 3 hours to spin up the Linux server, MySQL and nginx web servers, install and set up WordPress, and move site from shared hosting to droplet. The next step is to see the reliability of this setup, if everything is ok, I plan to move to here.

I like the driving with Serenity on board

I continue to be Serenity’s weekend activity driver these days. I like spending time with her, esp. when she asked me questions when we go to COCA for her ballet class: it’s about 15 minutes one way, and it’s Sunday afternoon, so it’s not as busy.

These days she like to say something, usually some facts or something she recently learned, then ends with “right, daddy?”. Most of times she was right, and I would say yes to some not to critical/important questions anyway. I think from her perspective, she likes to get “ok” or some form of approval/agreement from grown-up like me.

It’s funny I recall she likes to chat during our KinderMusik at JCC Chesterfield (about 15 to 20 minutes drive) in the past. It’s usually better than 5 or 10 minutes drive in terms of the quality of conversation.

Kids grew up fast. I enjoyed talk to them esp. when I don’t have to discipline them. Those sweet talks, sometime before her bedtime.

One thing is besides the constant iPhone staring, we do have the memory in photos: for example Google Photo reminds me what we did a year ago with Serenity, at Beirne Park or something. And we have this blog. I know there is very few readers, but I do read it such as Serenity is 100 days old, etc. as Sophia is the new baby, she is 14.5 half months old now.

A few Checking account promotions

(Update 11-05-2015) Citibank Gold Checking account offer: 50,000 AA miles or 50,000 ThankYou Points (doctorofcredit has a detailed explanation and step-to-step guide). This seems like good deal even consider $90 monthly fees (3 months). Also, a top on checks. Sometimes it cost money to get beginning checks for a checking acct. One way to workaround is to use PayPal as a conduit. I recall I used it long time ago when I sold stuff on ebay. Almost forgot about it as I have not done it for years. One drawback compared to check is PayPal is a bit slower because it adds a layer.

(Update 10-16-2015) Two more checking account offers. Santander and TD Bank (expired 11/05/2015, per hustlermoneyblog). Both offers $150 for opening account and direct deposit for (Santander), 15 debit transactions for TD Bank.

(Update 10-08-2015) Hunnington Bank is doing a $200 checking account offer. Here’s all it takes to get your $200: Open a new Huntington 5 Checking account using the link below by November 24, 2015. Make at least $1,000 in deposits within 60 days of account opening. It’s really that simple. We’ll then deposit $200 into your new account within 14 days of meeting the requirements. Read more about waiving monthly fee from here. (hint: $5000 account balance for one). Also note: This offer is only available to online applicants residing in Ohio, Michigan, Indiana, Pennsylvania, Kentucky and West Virginia.

(Update 10-01-2015) More checking account opening bonus, this one from First Tennessee Bank, offers ends on Oct 31st, 2015. “To receive your bonus, you must open the checking account online and ensure the code ONLINE appears in the online application where “Offer/Promo code” is requested. You must have an opening deposit of at least $300, and at least one direct deposit must post to your account within 60 days of account opening…” (11-03-2015) I received their bonus shortly after meeting their requirement. That’s fast :-)

Also useful links: Doctor of Credit List Of Methods Banks Count As Direct Deposits (not super scientific, but still useful if one plan to use Paypal instead of employer paycheck); My Money Blog Applying for Multiple Bank Accounts: Can You Apply For Too Many?

(Original 09-27-2015)
Fifth Third Bank
53 Bank offers $150 for opening Checking account with qualifying activities. Link here. Note this is direct link (not affiliated link, in other words I am not taking any commision from the bank. Same below). Qualifying activity includes three online bill payments, using Fifth Third Bank’s online bill payment service, and direct deposit. Don’t know when the offer will ends. Last time I got a $200 offer from them and enrolled at the last day (July 26, 2015). They were very quick to deposit the bonus money after I met their requirement.

Note: Fifth Third Bank will also donate $150 to “Stand Up to Cancer”. Keep in mind there are many cancer related charity ripoffs according to Anderson Cooper, it seems SU2C is legit.

BMO Harris
Back to topic. BMO Harris is doing $200 offer for new checking account with direct deposit. Link here. Offer (account opening) is valid between July 27, 2015 and January 22, 2016. (11-3-2015) Just opened an Everyday Checking account with them today.

PNC Bank
PNC is offering up to $400 for opening new checking account with qualifying direct deposit. Offer ends 12/31/2015. Link here. (11-3-2015) I received their bonus about 28 days after meeting their requirement.

1) The bonus overall is not as general as some credit card offer (more than $500 opening bonus with qualifying spending). But keep in mind opening credit card usually means a hard pull on credit record, while opening checking account does not. One thing keep in mind is one has to be US citizen or permanent resident for opening checking accounts, due to the new laws and regulations in this new era.

2) Also the bonus from checking account will usually reported as interest income or ordinary income. It will be taxed when we file the tax next year, this is different from the credit card promotion, which usually billed as rebate or points (and there is no tax implication).

A map (or a chart) is worth a thousand words

airlines miles award chart

Complete map of Starwood SPG hotels

award map (hotels points and map)

British airways avios map

Car rental primary insurance

PS (09-24-2015): booked Westin Lake Las Vegas via BA Avios points. It cost about 11,000 points for the premium room ($81 + taxes). The room there starts at 7,000 SPG points, note 7,000 points is for traditional room (I got a premier double room). I feel it’s a decent deal as SPG points are usually worth more.

Westin Lake Las Vegas

PS2 (09-25-2015): more hotels booking. Last night I also booked Hilton Anaheim both via BA Avois (about 18,000 points) and Chase Ultimate Rewards (about 10,500 points). The hotel was very close to Disneyland. And today I booked one more night Hilton Anaheim via Chase UR (now we have 3 nights total), it seems the UR points for the hotel increased overnight, but the dollar price stayed the same. I also booked Double Tree Anaheim which is nearby using HHonors points (20,000). The next step is to get the Disneyland (and California Adventure) tickets booked.

Hilton Anaheim

Double Tree Anaheim

PS3 (09-26-2015) Today I decided to book Hampton Inn Los Angeles-Orange County-Cypress, instead of the Double Tree above. Hampton Inn has free parking and breakfast compared to Double Tree. It’s a bit farther away from Disneyland, which is OK for me as I think we may leave Disneyland on that day, thinking take a tour at Seal Beach or Newport Beach.

hampton inn los angeles orange county Cypress

Discover Apple Pay 10% cash back until end of year

With $10000 as spending limit. The prerequisite: iPhone 6, 6+, 6s, 6s+; iOS 9; in store purchase, no giftcard.

Stores support Apple Pay

Here in St. Louis, Schnucks, Dierbergs, WalGreens, St. Louis Bread Co. (Panera Bread) all supports Apple Pay. Though on Sept. 17 I tried at Schnucks counter, it failed, note this is the 2nd day of Discover Apple Pay launch, so it could be a glitch. It worked on Panera Bread (Sept 18, 19). I will also try Trader Joe’s as I saw it’s coming soon from the Apple website.

Why iOS 9 for Apple Pay
It’s a bit more security. Previously one can add a card to Apple Pay just from the physical card. So basically if a card is stolen, technically it can still be added. Obviously the card issuer usually has fraud detection system in place to catch those. But iOS add a two factor authentication when adding a new card, which is definitely a great idea. We catch the problem earlier this way. A thief cannot add a stolen card as easily as it used to be.

Btw, I saw the fingerprint based authentication get popular as BoA app and other apps (e.g., Apple’s own iTunes connect) use that for authentication. Save some typing work and more security.

(Update 09-20-15) It appears Discover Apple Pay still does not work on local Schnucks store. It prompts “do you want cash back”, I said “No”, then the transaction got declined. Something at a miss at Schnucks or their payment processor. Because it does work at Panera (St. Louis) Bread since Sept 18. I guess one way to test it is to swipe Discover Card directly to see if it works :-)

(Update 09-25-2015) Used Apple Pay with Discover at Subway for lunch today, it worked flawlessly.

(Update 09-27-2015) Worked in Trader Joe’s too.

(Update 11-07-2015) Discover Apple Pay works in Schnucks now. 

Fuel Rewards Network, eBates

Fuel Rewards Network offers about 1% for shopping online, e.g., I bought $36 worth of clothes from Load and Taylor via their shopping mall, it gave me 10 cent. The calculation goes like this: $36 * 3 / 1000 = $0.108 rounded down to $0.10 which is 10 cent per gallon gas discount. If I buy 10 gallon of gas, that’s $1.00 discount. $1 divide by $36 which comes out by 3%. Note typically shopping mall earning rate is 1 instead of 3, so in the example above, I will earn 3.6 cent per gallon gas discount, instead of 10 cent.

Another example, I shopped at gap via FRN, bought $50 apparel. It gave me 10 cent also (2x earning rate instead of 3x at L&T). This is lower than the gap rebate one can get from ebates right now (typically 2%, now at 8%). I mean 3% or 2% vs. 8%. So the bottom line is we can use this calculation to maximize the cash back (rebate).

Btw, FRN is free to join, and as a minimum it offers 3 cent discount for gas purchase, so in other words about 1% in addition to whatever the credit card offers (in my case, I use Sams Club mastercard or the Pentagon Reward visa, both offer 5% cash/points back).

Back to the topic, I think it’s worth to join FRN since we already spend money on shopping or dining, and those activities adds up to gas savings, in addition to the regular credit card cashback/points we get. Don’t spend to get the points though :-)

(Update 09-20-15) Other two ways I got discount for gas purchase. I use both Sam’s Club MasterCard and PenFed Rewards visa card, both gives 5% cash (points) back, which is unlike some of those rotational 5% reward cards (e.g., Chase Freedom, Discover Cash Bonus). Sometimes it’s hard to keep track of those quarterly rotational promotion. This is also higher than 3% cashback from Amex Costco Card. PenFed also offers 3% for supermarket and grocery shopping. And Sam’s Club MasterCard offers 3% on restaurant purchase.

How to fix iPhone 5 5s 6 6 plus speaker after dropping it to water

I made this mistake again. Last time I dropped my iPhone 4 into water, I tried this “put it in rice” strategy. This time I also this trick, but the speaker was not still working. Luckily I found this youtube video on the web, basically I used a cotton knob to clean up the headphone jack. It worked.

Continue reading How to fix iPhone 5 5s 6 6 plus speaker after dropping it to water

It’s Friday again

This afternoon (actually more like evening), on linkedIn I was surprised to find that the company I used to work for has laid off its CIO (chief information officer). I remember we talked about I joined the company in late 2011. I left the company about 2 years ago, to pursue better opportunities. Also I knew the company was not doing well financially. It seems now it’s becoming more and more difficult for the company to survive. Note it’s more like industry wide problem, not isolated the company. Management could do something, but once a fatal mistake made by former CEO (buy another company at market top using borrowed money), there is very little current management can do.

Also, from I found a former colleague of mine, we started on the same day on a small software (custom development) company 5 years ago, and he left the company a year later, and found he has driving trucks for a while after that stint.

Last but not least, I saw my neighbor when he came back from work, and just exchanged “hellos”, and he said it’s Friday :-)

(11-12-2015) Tomorrow will be friday again. Today I happened to see the website I worked on and put quite a bit effort went live, here it is. It’s a mixed feeling for me, because I left the company and the team a few months ago, shortly after the direction of the project changed. It’s good to see the project finally pulled up and it even got 2 mobile apps, cool :-)

Went to kindergarten roundup at Yoyo’s new new school

To be precise, it’s Spoede Elementary, about 5 mins drive from my condo. When I bought the condo 10 years ago, I was single and had no kids. But I knew Ladue is a good school district. That’s one reason I bought condo here. If things does not work out, I can rent out the condo to someone else who will like this location. Back to school.

We met the school principle, the 4 kindergarten teachers, one counselor, and one idea lab teacher (outside classroom?), a lot of parents from diverse background. The teachers gave a lot tips about transition kids to kindergarten, and I like what the principle said at last: we will treat your kids like our own. That is indeed what I felt at some of the school Yoyo already attended. And this is largely true in the post Newtown world. I recall some of the teachers lost lives trying to save the kids. Maybe a bit harsh but I think we need to think about gun violence and do something about it.

Back to school, we are really excited to see Serenity growing up, and we also like the ROCKS principle (Respect, Ownership, Cooperation, Kindness and Safety) of the school.

Translate »