WordPress in a Weekend

WordPress in a Weekend

Hello, World Wide Web!

So… it’s been about a month now since I’ve had this blog up and running.

If you’ve ever thought about starting your own blog, you should totally do it. It really is awesome having a space of your own — to collect your thoughts and share with the world.

So far it has been a great experience.

Except for that one weekend. The first weekend. The weekend I “learned” WordPress.

Setting up your WordPress site is trivial. If I were to do it again, I would skip the local install altogether; scroll down to the section “The Method I Should Have Used” to save yourself some extra work. The rest of this post is my experience with working harder, rather than smarter.


The Local Install

My summary of events:

  1. Downloaded a copy of the source code from https://wordpress.org/
  2. Downloaded and installed XAMPP from https://www.apachefriends.org/index.html
  3. Dropped the WordPress source code into xampp/htdocs/
  4. Started the Apache and MySQL services and created a database

Lots of Google searches followed. Before I knew it, I found myself deep in the source code — wondering about things I shouldn’t and what kind of reports I could build with data pulled from available APIs. I’d also spent more time than I’d like to admit, tweaking the “look and feel”. I felt like a Web Designer at one point, incrementing the margin and padding values, nudging things “a bit to the left” and asking myself, “are my links the right color?” A new respect has been earned for the Web Designers out there. Without you all, the web would be a bunch of data-filled boxes.


Pushing to Production

Toward the end of the weekend, and after some several more hours of brainstorming and writing, I was ready to deploy.


Domain Name and Hosting

There are a myriad of hosting options out there and you can’t go wrong if you choose one of the WordPress Recommended Hosts. I ended up going with SiteGround after a recommendation from a friend.


Migration to the Cloud

SiteGround has a WordPress Automatic Migrator and despite it touting a one-click deployment, my local installation made things a bit more complicated — even unsupported.

Challenge accepted. Or so I thought. I forwarded a firewall port, added an API key, and holy shit, I’m connected.

After dinner I came back to check the progress. None. Zero percent? But how? The engineer in me didn’t waste too much time. Plan B.


The Brute Force Method

Here’s how to do it assuming you have cPanel access on your hosting provider:

  1. Using Filezilla or your favorite FTP client, connect to your host. Username and password should be available in your hosting account.
  2. Upload your local WordPress directory, in my case xampp/htdocs/, to the public_html/ remote directory.
  3. Within your local phpMyAdmin application, export your WordPress MySQL database.
  4. Within your remote phpMyAdmin (via cPanel), import your WordPress MySQL database.
  5. Modify wp-config.php in your web root with your new database configuration.

Note: In the remote MySQL instance you will need to create a MySQL user account and assign it “All Privileges” permissions on the WordPress database.


The Method I Should Have Used

Had I known any better I would have deployed the site straight from my hosting provider and started working on it from there. They have options for installing frameworks like WordPress with minimal effort as seen in the image below.

But… at least I know how to back up the application and the database. Although I bet there is a button for that too. Best of luck on your new blog!


References

Featured image credit -> Nathan Dumlao