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

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


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 (be careful things might not run correctly):

sudo apt autoremove


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

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

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.

Moved to the MODX Cloud

After the disastrous failure of trying to upgrade MODX, which brought down the Scalia Law website for almost an entire day, I needed to make a move. It was an embarrassment and my reputation was on the line.

I looked into the possibility of moving the site to WordPress or Drupal. The development would be expensive and the migrating process would be long, but we needed to get off MODX or move off a dedicated server I managed.

I presented the options and explained the pros and cons to my supervisor, but she had another idea in mind. She was neither impressed with WordPress or Drupal. Moving almost 1,200 pages to another platform seemed scary and daunting. She suggested that we should look into MODX Cloud. My worries turned into excitement when she made that suggestion. I didn’t think it would be an option because I strongly advised that we move to MODX Cloud a few years ago, but it didn’t work out.

I immediately reached out to the MODX Cloud team and they offered to take care of the migration for us at no charge. In the past few weeks, they worked closely with me to make sure the migration went smoothly. They explained everything I needed to know. They moved and tested our site on their Cloud platform. They made suggestions to improve our site. I was amazed with the level of support they had provided us at no cost. We were more than happy to pay for the business package and a few extra options they offered.

For the first time in almost 10 years at Scalia Law, I feel so good about handing over this part of my job. A huge rock has been lifted off my chest. Server administration was never my strong suit. I rather have the experts taking care of the server and I take care of the design and the development parts of the site. The most stressful part of my job has migrated. I now can enjoy and focus on what I do best for the law school.

The Scalia Law website is now in a good home. Who can take better care of MODX than the creators themselves? The team was a pleasure to work with. Special thanks to Jay Gilmore and Veljko Mirkovic for their patience and expertise. I am so glad that we’ve made the move. Although MODX is small and its adoption is not as popular as WordPress or Drupal, it is still a powerful and flexible content management system. The people behind it are just phenomenal.

The MODX Disaster

After watching the final U.S. presidential debate on Thursday, I checked my RSS reader instead of going straight to bed. I saw a notification from MODX releasing 2.8.1. I was a bit surprised because I just upgraded to 2.8.0 only a few weeks ago. MODX usually takes at least 6 months to put out a minor release. It must be some security issue that they needed to patch.

MODX is the content management system that powered the Scalia Law website. Since it was midnight so no one would be logging into the CMS to make any updates; therefore, it was a good time to do the upgrade. It would only take me about 15 minutes to complete. I followed the procedure like I had always done in the past. Something didn’t go right when the files which were supposed to be merged had prompted me to replace. When I allowed the files to be replaced, the website went down. The files that used to take 15 minutes to merge were now estimated about 55 minutes.

I started to panic, stopped the upload, and tried to figure out what went wrong. I went into our daily backups and re-uploaded the directories I had made the upgrade. The process alone took about half an hour. The website was still down. At this point, I re-upload the entire site as well as the database from two days before. This process took a couple of hours. It was already three in the morning and nothing worked. I called GoDaddy, our hosting provider, to see if there’s anything they could do. The first time I called, the technician recommended that I try to re-upload the site from a week old. If that would also fail, I could request a disaster recovery.

I went on Twitter and tweeted for help from the MODX community. I received no response. Its community is way too small. Around six in the morning I started to get messages from colleagues telling me that the site had been down. I explained the situation to my supervisor and her supervisor. They completely understood. Since I could not get any help the last resort was to ask GoDaddy to perform a disaster recovery. The site remained down until around 4:45 pm on Friday. The site went down for 16 hours and I feel horrible. It was all my responsibility alone to bear. I did not sleep that night and kept checking my phone for a miracle to happen.

Although the website is now backed up working, we are set back 3 weeks. GoDaddy only keeps a snapshot every two to three weeks. Now I have to restore what was missing and it is a pain. I am also causing other people to redo some of their work as well.

After this incident, I now determine that we will need to get off MODX. This CMS is dying. It could never get beyond a couple of thousand enthusiasts. I should have called the shot a long time ago, but I held on the hope for it. Now it has become cleared that I need to make an exit strategy. It’s time to migrate to WordPress.