Many people are adopting the WordPress content management system as their platform of choice for blogs and web sites. My latest project will be to convert an existing static web site to WordPress. I worked with WordPress in the past but haven’t done much with it until recently. I have several candidate web sites for conversion. I’m not really sure how well any site will convert, so it may ultimately have to been converted manually. The goal is not really to replicate the old site anyway, but to build a newer, more flexible — and to some extent, user-maintainable one.
The Plan
Rather than installing WordPress directly on my local web server installation on my desktop computer for the conversion and refinement phases, I chose to download and run a virtual machine appliance from Bitnami with WordPress pre-configured and ready to go. I’ll be trying out a couple of plug-ins to import the existing HTML pages and create a complete backup of the newly configured WordPress web site when it’s tested and ready for migration to the live web site domain. The plug-ins I have initially targeted to employ for this are Import HTML 2 and Duplicator. The web site for this is actually for my sister’s farm business, Ricochet Farms at http://ricochetfarms.com. It’s actually pretty amazing that she’s been able to maintain it as well as she has since she’s had no training on computers to speak of. She uses Dreamweaver for most of the work. We also plan to monetize the site with some affiliate links and unobtrusive pertinent ads.
Configuring My Computer For a 64-Bit Virtual Machine
The BitNami virtual machine I downloaded is a minimal configuration of 64-bit Ubuntu 14.04. Initially, 64-bit options were not available in my instance of VirtualBox. There are settings in the BIOS of the Dell 780 computer that are turned off by default. And yes, it’s an older machine I got for free, upgraded the processor to the fastest available with the most cores possible, added 8 gigabytes more RAM (10 GB total currently,) and migrated the system to an SSD (solid-state drive). It’s very quiet and fast enough for most purposes. Before I tackled the BIOS changes, I “upgraded” VirtualBox which required removing the older version first. All of my prior settings for my virtual machines were intact afterward.
I had to ensure that I had the following settings configured:
Security > Execute Disable (set to On)
Performance > Virtualization (set to On)
Performance > VT for Direct I/O Access (set to On)
Performance > Trusted Execution (set to Off)
Don’t ask me why, but I had to reboot twice for the 64 bit client creation options to show up. I rebooted again to double-check the settings, exited the BIOS and continued booting, and then the 64 bit options appeared.
Importing The Bitnami WordPress Appliance
The appliance file I had downloaded was unzipped, the OVF file imported into VirtualBox using the included VMDK file as the existing virtual hard drive, and then it was started up. I logged in to the command line interface that appeared, checked the IP address, and then browsed to it using my desktop browser. The default WordPress web site dutifully presented itself which was gratifying. However, I knew that the work was just beginning.
Transferring Files to the Virtual Machine
In order to import an existing web site, the files have to exist on the same server as the WordPress install. The virtual server is configured with no FTP or SSH access by default. To use SSH or SFTP, sshd must be enabled on the virtual server. Detailed instructions are available here.
$ sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh
Now SSH or SFTP access is possible, using an FTP client like the free FileZilla, for example.
Rather than using FTP to get all the files from the live web site, I used the command line utility wget. One reason I did this is because there are a lot of unused image files on the site and I didn’t want to transfer all of them to the virtual machine. I took that subset of files and used FileZilla to transfer them to the virtual machine. Then I used the Import HTML 2 plug-in to import the site by choosing Plugins from the admin interface, then Import HTML 2, and setting the options. I went largely by the instructions provided on the Import HTML 2 User Guide. The result? Well, the first pass yielded a site with most of the pages created, but there is still a lot of manual tweaking to do unless I can specify some different options in the plug-in and try it again. For example, I am seeing links that are absolute to the local machine. That won’t work when the site is uploaded.
More updates coming soon…