Why We Shouldn’t Embed Twitter

Here are my concerns about embedding Twitter:

  1. Because we embed Twitter into our homepage, we carry an extra load, which slows down our homepage performance.
  2. Twitter design doesn’t blend well with our design. We don’t have any control of how it looks. The typefaces and colors are different. Twitter’s blue doesn’t go with our brand colors. Although we both use sans serif typefaces, our sans has a friendly, humanist quality to it. Twitter’s sans is geometric and corporate.
  3. Privacy worries me the most. By embedding Twitter on our site, we give Twitter permission to track our users.

Here’s Twitter’s policy on privacy:

When you view Twitter content such as embedded Tweets, buttons, or timelines integrated into other websites using Twitter for Websites, Twitter may receive information, including the web page you visited, your IP address, browser type, operating system, and cookie information.

Instead of embedding Twitter, why don’t we do it like the podcasts? We list all of the Twitter accounts, including the centers so they can also get exposure on our homepage. Here’s the implementation.

Creating a New MODX Cloud

MODX still remains one of the underappreciated content management systems in the game. If I have to choose WordPress, Drupal, Joomla (is it still relevant?) or MODX for a medium- to large-scale website, I would go with MODX without hesitation. The only downside to MODX is the tiny community. MODX still struggles to grow. Comparing to WordPress, MODX’s development is much slower because it doesn’t have contributions and resources like WordPress. Nevertheless, its platform and power take no backseat to WordPress, especially MODX Cloud.

The Law School migrated to MODX Cloud for over a year ago and the experience and the service had been exceptional. One of the best features on MODX Cloud is the ability to spin up a development cloud exactly like the production cloud in a couple of minutes. When MODX released version 3.0.0 back in April, I needed to spin up a development cloud to test first before making the upgrade to the live site. I am glad I did because I could have been screwed if I went ahead and upgrade from version 2.8.3 to 3.0.0 on the production cloud.

To create new cloud in MODX, I logged into the dashboard, hit the “Add New Cloud” button, gave it a name, changed the version to match the version of the production cloud, then hit the “Complete Cloud Creation” button. Once the new cloud was created, I went to the backup archive, chose the latest backup from the production site, then selected “Restore Backup Into” the new cloud. That was it. When the new test server up and running, I upgraded MODX from version 2.8.3 to 3.0.0.

Although the upgrade passed, the site didn’t work 100 percent. Third-party extras, such as getResource and Article, hadn’t yet compatible with the new MODX. This is where MODX falling behind WordPress. One of the best features of WordPress is the upgrade compatibility. In addition to MODX, the Law School also uses WordPress Multisite, which is currently powering 46 sites, and we never ran into any upgrading issue. We even set automatic upgrades for the core and all the plugins.

The Law School main website, which is powered by MODX, is much more complicated than the sites in WordPress, but a major upgrade shouldn’t break the site. I tried to fix the issues myself on the test site, but I haven’t had any success and MODX’s small community isn’t helping much either as I reached out for support. As a result, I have been holding off on making the upgrade to version 3.0.1 until the Extras get upgraded to MODX 3.0.1. So far I haven’t seen any progress on MODX to get the Extras work with the new MODX release. Though MODX continues to support version 2 with the release of 2.8.4 and I had made that upgrade.

Migrating and Upgrading Droplet

In attempt to upgrade one of my Droplets from Ubuntu 20.04 to 22.04, I kept run into the usbmuxd errors. I reached out to DigitalOcean and they suggested migrating to a fresh Ubuntu 22.04 server rather than upgrading in-place (sudo do-release-upgrade). The process seemed quite time-consuming. As a result, I tried a different method.

To begin, I updated to the latest versions of all packages for the current release of my Droplet:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

In DigitalOcean’s web interface, I powered off my current Droplet, took a snapshot, then created a new Droplet from the snapshot. Once the new Droplet was created, I ran sudo do-release-upgrade. To my relief, the upgrade succeeded without any error.

I have a handful of sites on this Droplet, but they all PHP files and no database. To check and see if my websites worked, I edited the Hosts file in Terminal:

sudo vi /private/etc/hosts
11.111.111.111 donnytruong.com

To edit the Hosts file, type i for insert, then :wq to write and quit. After using sFTP to make sure that the sites were indeed working correctly, I went into Cloudflare’s DNS interface to update my A records to point to the new Droplet.

I am pretty darn proud of myself for figuring this one out.

Upgrade to Ubuntu 22.04

I was up late last night upgrading Ubuntu 20.04 to 22.04. I have two Droplets in DigitalOcean. One just for this WordPress blog and one for my other sites. The Droplet for my blog upgraded smoothly. Unfortunately the other one didn’t upgrade successfully. I restored and tried three times. I even tried to diagnose the issue, but I couldn’t get through usbmuxd. Here’s the error:

Errors were encountered while processing:
 usbmuxd
Exception during pm.DoInstall():  E:Sub-process /usr/bin/dpkg returned an error code (1)

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (434.0 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): c

Could not install the upgrades

The upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).

Setting up usbmuxd (1.1.1-2build2) ...
usbmuxd.service is a disabled or a static unit, not starting it.

Upgrade complete

The upgrade has completed but there were errors during the upgrade process. 

Even though the upgraded seemed to fail, my sites loaded fine and everything seemed to work, but I revert back to Ubuntu 20.04 just to be safe. If anyone has any experience with this sort of thing, please help.

From GoDaddy to CloudFlare

On a whim, I transferred all my domains from GoDaddy to CloudFlare. I should have made the move a long time ago, but I was afraid I might screw up my domains. It turned out the the process was so darn easy because I have been using CloudFlare free services including SSL certificates, security measures, and speed benefits. All I needed to do was to select the domains and to get the authorizations from GoDaddy. CloudFlare takes care of the rest.

I registered all my domains with GoDaddy since 2003. While GoDaddy has been reliable, I wanted to support CloudFlare for the great services it offered for free for many years. CloudFlare has been a trustworthy tech company. It definitely helps making my websites more secure and faster.

Now that all of domains are all under CloudFlare, I couldn’t be happier. It is much easier to have everything in one place. I hope that CloudFlare won’t turn evil in the future.

WordPress Races to the Bottom

As WordPress moving toward full-site editing with Gutenberg, the software has become an expensive alternative to Squarespace or Wix. Developing a WordPress theme from scratch seems like a waste of time. The quick way to create a site using WordPress is to use an existing theme and make a bit of cosmetic changes.

I had seen web agencies charging $30,000 to $40,000 to develop a WordPress site. They simply bought a $59 theme and created a child theme to develop the site. They also added tons of plugins to meet their client’s requirements. As a result, the code is messy, the loading is slow, and the look is similar to thousands of sites from the same theme.

It’s a shame that WordPress has gone down this path to compete with Squarespace and Wix. WordPress is no about clean HTML markups and minimal CSS. The markups WordPress rendered behind the scene were just horrendous.

Cancelled HostPapa

Today I deleted all the files and databases for both Visualgui.com and iLoveNgocLan.com accounts on HostPapa. I migrated Visualgui.com to DigitalOcean in August and migrated iLoveNgocLan.com to SiteGround in September.

HostPapa is one of the greediest hosting providers on the internet. It tried to hit me twice with CPU limits for my WordPress sites. If you’re hosting your WordPress site with HostPapa, I recommend that you move somewhere else. If you have technical background, move your site to DigitalOcean. If you don’t, move your site to SiteGround. The SiteGround Migrator plugin worked like a charm. It took me less than 30 minutes to move iLoveNgocLan.com.

I never wanted to host with HostPapa to begin with. I didn’t have a choice after it acquired Lunarpages. After the takeover, HostPapa increased my monthly price already, but it was not enough so they tried upgrade my plan again and again. I put in requests to cancel everything on HostPapa and will never come back to them again.

Notes on Setting Up Cloud Hosting with DigitalOcean

When a reader recommended that I should look into moving my sites from the terrible share hosting HostPapa to the cloud hosting DigitalOcean, I hesitated. Setting up the Droplets seemed to be overwhelming. Fortunately, DigitalOcean has excellent tutorials to guide me through the entire process.

The command line is still daunting to me, yet it is so awesome at the same time. I moved six static (somewhat dynamic) sites into one Droplet and this blog, which powered by WordPress into a separate Droplet. Setting up WordPress is a bit more complicated. Although DigitalOcean offers a one-click install for WordPress, I did the long way to have more control of the environment.

Here are the tutorials I used to setup my Droplets:

  1. Initial Server Setup with Ubuntu 20.04
  2. How To Install the Apache Web Server on Ubuntu 20.04 and Setting Up Virtual Hosts
  3. How to Set Up SSH Keys on Ubuntu 20.04
  4. How To Create a New Sudo-enabled User on Ubuntu 20.04
  5. How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04
  6. How To Install WordPress on Ubuntu 20.04 with a LAMP Stack
  7. How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

How to Upgrade Ubuntu

Once SSH in, look for the number of updates can be applied immediately. If updates are available, shut off the Droplet power:

sudo poweroff

or

sudo shutdown -h now

Then take a snapshot of the Droplet through the control panel on DigitalOcean. Once the snapshot is taken, turn the power back on, SSH back in, and follow this tutorial: “How To Upgrade to Ubuntu 20.04 Focal Fossa.”

Here are the steps to update:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

To check for a new Ubuntu release:

sudo do-release-upgrade

Remove unused packages (Don’t run this on the WordPress Droplet):

sudo apt autoremove

AutomaticSecurityUpdates

To automatically install security updates, the “unattended-upgrades” package was installed:

sudo apt-get install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades

I am Done With HostPapa

Last month I migrated all of my sites off HostPapa and onto DigitalOcean. Since ilovengoclan.com is on a different account, I was not planning on moving it, but HostPapa kept trying to make me upgrade. I am not sure how it keeps reaching its CPU and Input/Output usages when iLoveNgocLan.com has been inactive for years. No one has written any new post and no one had made a comment for a long time. I had done all that I could to optimize the resources, but it was not enough.

HostPapa warned me that I have to resolve the issues by the end of the week or upgrade my plan from $9.99 to $23.99 a month. That’s almost 240% increase. My solution was to migrated to DigitalOcean as well. I no longer had the time and the resources to deal with WordPress anymore; therefore, I used SiteSucker to turn the entire site into static HTML files. For years, ilovengoclan.com has not been active. Keeping it in WordPress is just too much maintenance and time-consuming. I have thought of just either shutting it down completely or keep the legacy online. I settled on the latter. The site is now read only. It can no longer be updated or added comments.

Now I am completely off HostPapa. Both accounts (visualgui.com and ilovengoclan.com) had been paid to HostPapa until February of next year, but I rather take the loss than hanging in there. If you are hosting with HostPapa, you should consider getting out. My sites were fine with Lunarpages for years until HostPapa scooped them up. HostPapa is greedy as fuck. They all about forcing you to upgrade. Server technologies are cheaper now and they should offer more resources for our money, but they want to go the opposite direction so fuck them.

Migrated to the Cloud

After hitting the CPU limit on the shared server at HostPapa, I knew I needed to make the move for the long run. I am so glad that Thủy Nguyễn, a long-time reader of this blog, recommended DigitalOcean. I hesitated at first because DigitalOcean is a cloud-hosting service and I do not have much experience with cloud servers. Fortunately DigitalOcean has tons of tutorials to help me make the move. From setting up the LAMP stack to virtual hosts to SSH keys to Let’s Encrypt, I was able to follow along. I had to destroy several deployments and started over. I hadn’t worked with the command line in a while and it was like rediscovering an old love.

I created two Droplets: one exclusively for this blog and one for my static sites including Vietnamese Typography and Donnytruong.com. I don’t know for sure, but I suspect Vietnamese Typography is the cause for the CPU shortage. The site hosts tons of web-font files. I was thinking of limiting the number of fonts being served on the site, but it would ruin the purpose of the book. I wanted to showcase as many Vietnamese typefaces as possible. Now that the web book is on the cloud, I hope the traffic won’t blow up my budget.

Migrating this blog was a huge challenge. Transferring the database over was time consuming. I tried SQL dump, but it didn’t work too well. I finally just use the export and import tools provided by WordPress. I can’t believe it worked great. I still have a handful of things to take care, but I need to get some sleep. I hope to get back to regular blogging schedule soon.