Ben
Ben is a lifelong Nintendo fan who likes to build websites, and make video games. He buys way too much Lego.
WordPress and Games
I used to work entirely on my local computer, with apache, mysql, and php installed (XAMPP on Windows, MAMP on Mac), however working like that made collaboration really tough so I decided to move online, and that’s what I am going to write about below.
My solution was to create a sub-domain on one of my websites and then install WordPress mu (which is now WordPress 3.0). Using the multi site feature of WordPress means that I can have a separate site for each theme without having to set up loads of copies of WordPress.
As I mentioned I moved my development online, but the coding is all done with software on my local machine. I use different software depending upon the job or the operating system.
On Windows I use the killer combination of Notepad++ and WinSCP. WinSCP is an awesome piece of freeware that works as a remote file browser/ ftp program. Notepad++ is also fantastic, and unfortunately I haven’t been able to find anything that replicates their functionality on my new MacBook Pro.
On the Mac I have two different setups depending upon the task. My WinSCP replacement is Transmit 4, and Notepad++ has been replaced by Editra (nope, not TextWrangler/ BBEdit or any of the other more famous editors). My second choice is a standalone program, Netbeans. This is a fantastic bit of kit but is best suited to projects (perfect for themes) and not individual files (such as I edit with Transmit and Editra).
To test my themes I install some test WordPress content and a couple of plugins.
The test content is used to make sure that the css and the functionality cover all the possibilities. All css styles, and all possible combinations of built in functionality. Eg comments on/ off, threaded comments, trackbacks, sticky posts etc. To do this yourself I would recommend the official WordPress test content.
In addition to the test code I install a database query plugin. This plugin allows you to check what queries are executed on the site and then optimize your code to either reduce/ remove queries, or to see what ones are running slowly and need rethinking. Provided you are using the built in WordPress functions and not writing your own queries you should be fine, but start writing complex queries and there may be problems.
One thing I am missing is a decent automated test suite for WordPress. I’ve seen a few attempts but so far have yet to find something that does everything I want in as little effort/ input as possible. The easier it is to run the tests the more tests will be executed. I think that’s a challenge for someone more intelligent than I to solve.
Because I develop online theme deployment is much easier. What I did was write a small bash script that copies the theme files to my demo server (which is actually a sub-domain running from the same machine). My bash script also deletes all cache file, and packages up the theme zip files so that people can download the themes as soon as an update is published.
One thing I haven’t mentioned is SVN or Version Control, this is something I haven’t really used for my personal work (have used it in the day job though), and it’s something I am definitely considering moving over to but for the time being it’s not really required.
So how do you develop your webites? Is there anything I could do better/ differently?
Nice tutorial. I’d personally prefer to use WAMP over XAMPP though. I don’t know why. Probably because it’s more user-friendly. XAMPP just seemed a bit bulky.
I used to use EasyPHP but switched to XAMPP, never tried WAMP – maybe I’ll give it a go sometime.
in windows, wamp + eclipse
in mac, mamp + eclipse
in linux, lamp + eclipse.
I found eclipse is really good for php as well. I use notepad++ for minor coding. But the intellisense bonus of eclipse really helps alot.
Funny, almost exactly the same, except I use FileZilla. I never understand why people want to me messing with WAMP/XAMPP setups when you can use WordPress MS/MU to work on a development subdomain.
One thing I would like to add when developing on ‘live servers’ is to use a plugin like Absolute Privacy to completely lock down your site.
And yeah.. need to start working on using SVN too π
I used FileZilla all the time before I started with WinSCP. Thanks for the tip on the Absolute Privacy plugin. I actually set up a htaccess/ htpassword combination to stop people from being able to access the sub domain – will need to check out Absolute Privacy to see what that does as well.
So in your opinion WinSCP trumps FileZilla? If so, I’m curious why π
There are a couple of reasons. 1, there was the seamless joining of WinSCP and Notepad++. I could double click a file in WinSCP and it would open in Notepad++, then when I save the file it would be uploaded automatically. In Filezilla you have to switch back to FZ and say yes to a couple of dialogue windows asking if you want to upload. Secondly it had instant logins for Putty, which makes logging into the websites command line simple as can be.
Been playing with WinSCP, and I see what you mean. Might have to trade it too. Thanks for the tip.
I’m using EasyPHP. I mainly use Dreamweaver CS3 because I like its syntax highlighting. Have read/heard of Notepad++ before, but after reading this post, I decided to try it. It’s free, lighter and had great features. I like the ‘remember current session’ as I work with the same files most of the time. Thanks Ben for bringing Notepad++ to my attention, it’s now my favorite and default editor. π