I had the good fortune recently to come into possession of an Asus Nexus 7 Android tablet. After a couple of months playing games on it, a task it excels at I might add, I decided it might be neat to see if I could setup a super-portable self-contained mini-development environment for WordPress. Turns out this is surprisingly easy to put together. With all the pieces in place I can both run and hack WordPress code on the device, even without an active network connection. There are surely many ways to accomplish this, but here is what worked for me.
- Keyboard
Trying to code with a onscreen keyboard is a show stopper for me, so in order to make this work I need an external keyboard. It just so happens that my employer, Automattic, included an exceptional Logitech Bluetooth keyboard in our very generous holiday gift packages. It pairs with the device out of the box, but unfortunately the media keys are not supported. To fix that, and to create some useful application shortcuts, I’m using External Keyboard Helper Pro (https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelper&hl=en). It’s not the most intuitive interface (quite possibly one of the worst) but it is powerful with a lot of advanced options. - PHP enabled web and DB server
I expected this to be the most pain in the ass part of the process, but it turned out to be really easy. I chose the Bit Web Server (https://play.google.com/store/apps/details?id=com.andi.serverweb&hl=en) app which is amazingly simple to use and does not require root privileges. It had a small problem with some default paths on first install, but that only took a minute to fix. Web and DB services are accessible via the localhost interface so you can use them without any external network connection. It even comes with phpmyadmin for database management. - Vim
I use Vim for software development and there is a very nice port for Android called Vim Touch (https://play.google.com/store/apps/details?id=net.momodalo.app.vimtouch&hl=en). It’s really a full featured build, and for the most part compatible with my standard configuration. - WordPress
Download the latest WordPress zip file, move it to the document root of the web server, unzip it, run the browser based install. I expected this to be easy, and I was not disappointed: It worked flawlessly.
So far it seems to all fit together nicely. I can switch between code and a browser with just the keyboard, and the fact that it’s entirely self contained over localhost is handy for traveling. I have some LONG flights coming up in the next month or two, so I’m hoping I can take advantage of the time and work on some plugins. I have to admit I’m strangely disappointed at how easy this was to setup. I expected a long drawn out battle with obtuse error conditions and undocumented issues. Maybe I should see if I can dual boot Debian and Android …