Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm interested in how other people develop themes and plugins for WordPress. To me, the in-browser editor in the admin panel just doesn't cut it. Currently, I'm just using an IDE with a PHP plugin (NetBeans), pulling down my development web directory from my server, editing in there, pushing up to test, and then migrating over to live.

I'm looking for how other people use their tools of choice to manage workflows for developing, testing, and deploying themes, plugins, and testing the latest versions of WordPress against these before going live.

I've made this a community wiki so that other people can share there development process. I'm not expecting to find a singular right answer here - your process is your own, and I wouldn't expect what you do to just work for myself or anyone else. I'm just interested in improving my ability to develop plugins and themes by seeing what works or doesn't work for other people.

Another question here discusses specific software tools to support WordPress development. Here, I'm looking for more process and methodology that can be applied independently of tools, with the exception of certain tasks that might only be accomplished in a certain family of tools.

share|improve this question
    
Given part of MikeSchinkel's answer perhaps I should refocus this to exclusively the workflow of development instead of both workflow/process and tools, and then link to both other questions as "if you want to know this, you probably are wondering this too"? If anyone thinks I should, I'll do it when I get home work work unless someone wants to do it sooner. –  Thomas Owens Aug 20 '10 at 10:12
    
You might. A similar question was already made on: wordpress.stackexchange.com/questions/324/… –  Tal Galili Aug 20 '10 at 12:34
add comment

9 Answers

Here's my workflow:

  • I begin with creating the project's directory as soon as I get the website's requirements and designs.
  • version the Static and the theme/plugin folder in Dynamic Folders using Git.
  • create virtual host for the project. I follow this convention:

    http://project1.dev/

    http://project1.static.dev (optionally)

  • I usually follow this folder organization:

    Projects
           Project1Name
                       Docs //Requirements docs, emails, other related documents. 
                            //This directory may contain directories with  names as dates
                            //(e.g 2014-01-01) to stay super organized :)    
                       Designs //All PSDs go here  
                       Data  //Database backup for the project,
                       Site
                           Dynamic //WordPress generally
                           Static //I don't always create a static version. I did a couple  
                                  //of times in the past. I use the same structure inside
                                  //the theme or plugin I'm developing
                                 js
                                 css
                                 img
    
           Project2Name and so on ...
    

I'm aware that I don't yet use a build tool on day to day basis, which makes me feel bad.

But I do use ANT build tool for my Sprite2CSS project coupled with a couple of PHP scripts for ANT's consumption.

Tools


Whether I'm on Windows or Ubuntu, I use the following :

  • Netbeans + SublimeText2 + Notepad++
  • WAMP - (PHP)
  • FakeMail
  • Git
  • Chrome and DevTools + Firefox with Firebug and Safari + IE for testing
  • YSlow!
  • Filezilla/WinSCP/NB's built-in FTP
  • Cygwin + Command prompt
  • Composer
  • NodeJS + NPM
  • SQLYog Community Edition + PHPMyAdmin

I'm open to suggestions on improving my workflow.

share|improve this answer
add comment

For the record, I mainly make whole Web sites and plugins, and deploy them. My workflow is very Ruby- and git-heavy.

To start out on a new project, I have a shell script which takes care of the whole business of setting up a new vhost and checking out the latest tag of WordPress (from our own git repository, which tracks svn).

The basic shape of a whole Web site is a git repsotory at wp-content. That contains a Capfile (capistrano's Makefile eqiuivalent) and a YAML configuration file which together take care of deployment ( http://github.com/dxw/wp-capistrano ). Also inside that repository I add the theme and plugins as git sub-modules (yes, we maintain git repositories for third party plugins too - we like to use the latest version that we've personally tested).

For the theme, I have a code-generation tool/framework ( github.com/dxw/wp-generate ). It means less thinking about where code should go, and it has a natural method of seperation between the View and the Model/Controller.

When writing plugins I use cucumber/webrat to do test-driven development ( github.com/dxw/cucumber-wordpress ).

And for migrating development databases to production, it's usually just a case of copying the dump over (WP_SITEURL and WP_HOME are set by capistrano on the staging/production machines so no search/replace).

I can't imagine how many hours I've saved with these scripts.

share|improve this answer
    
Special thanks for links. But don't you have situations where you cannot lose the contents of the production database? I haven't figured out a way to work except by selecting which tables to load by hand, and, even then, I have to redo menu items. –  Daniel C. Sobral May 16 '12 at 2:01
add comment

I do from in-place hacking on the server in the guts of a life system to more structured dev / test / stage / life cycle using version control systems and automated tests. It just depends on the job.

Next to that I report bugs back to the wordpress project when I run over them.

For plugin development I try to not re-invent the wheel all the time so to build new ones based on existing principles and patterns.

share|improve this answer
add comment

My workflow is pretty simple. I keep up with 4 environments. Testing, Development, Staging and Production.

Workflow

I use git for my revision control; I ignore the wp-config.php file so this file doesn't get overwritten as I push and pull across the different locations. I use unfuddle as the public / central repository for others to push and pull from.

This seems to work fairly well. I will commit as often as I can remember to while I'm working on Testing. At least once a day, if not more, I sync up with unfuddle and having the Development server pull in the changes. I try not to do any direct work on the server, so I am mainly just pulling in changes. If there was significant database changes made (new plugins, updated content, etc) then I will dump it from my Testing; make a backup of the Development and import the dump.

I use the same process for Staging. Staging sits on the same server as production it's double check the polish and make sure all the settings and modules are working on the production server. When I'm ready, I backup all the production files and database, and copy over the files and database from staging.

Since wp-config.php isn't in git, it makes it pretty simple to push and pull things around. When moving to production from staging, I copy over the files, and not use git, so I have to make sure the wp-config.php is correct.

I've asked a simliar question, and I am going to look into using this plugin.

I've also thought about using Capistrano; and creating a very detailed migration script that will go through and handle all the files and database backups/migrations as well as updating the file paths and URLs.

Tools

  • Textmate for my editor, though I'm beginnig to use MacVim. I use vim when on linux.
  • Sequel Pro for database manipulation. If I can't connect with it I'll use PHPMyAdmin
  • Transmit for FTP if I need it.
  • git for revision control. Mostly by command line, though I've been using the client in Textmate and GittiApp a bit.
share|improve this answer
add comment

One thing that helps me (especially when working on multiple client themes) is using a WordPress Multisite install on my dev server. That way, I can have as many open jobs as needed, and not worry about client A seeing client B's theme. Couple this with a comprehensive package of sample content that I load up each time I create a new site, and you've got an awesome dev system.

share|improve this answer
add comment

@Thomas Owens This question somewhat overlaps and duplicates the question "Software for WordPress theme/plugin development?." Not sure if we should close but is seems a slightly different focus. So...

Mac OS X

Here is my essential toolset right now for Max OS X (always looking for better.) Note i tried NetBeans and gave up on it. Too sluggish and too few features.

Windows Vista

When I was on Windows Vista my essential toolset was:

Code Deployment/Data Migration to Switch Domains

Not sure if this is exactly what you are looking for but I development a plugin to ease migrations between local dev server, test server and deployment server. I wrote about it here:

Hope this helps

share|improve this answer
add comment

WordPress Theme Development Process

  • Convert Mock Flow wire frame into basic XHTML and CSS

  • Plug XHTML into master.php template file and convert to Template tags and WP functions

  • Divide master.php into the various template files ie: header.php, index.php, sidebar.php, and footer.php

  • Write any custom queries and functions that might be needed

  • Plug in CSS layout and add div {outline:1px solid red;} to help tweak the layout4.

  • Upload Theme folder to WordPress for testing and further development

WordPress Development Tools

  • Aptana Studio WorkPlace code editor with built in FTP

  • Putty

  • dual 1920 x 1200 monitors with browser open on one and code editor on the other

  • Wacom Intuis 4 tablet

  • Firebug with Yslow and Google Page speed

share|improve this answer
add comment

I have a relatively uncomplicated setup that has evolved since starting my present day job ~2.5 years ago.

Developing

I do all my development over SSH, using Vim inside GNU screen. Vim plugins include:

Vertical splits and :set hidden are essential. I also prefer a 256 color terminal (iTerm on Mac OS X) with the railscasts color scheme.

We've also been slowly modifying dBug to suit our needs. Nice replacement for print_r() and var_dump() when you know the variable is an array or object.

Deploying

At present I don't work on many public plugins/themes, so I don't test plugin compatibility with multiple versions of WordPress. I code on the dev server and move that code into production via Subversion.

share|improve this answer
    
You can get very nice var_dump using xdebug. xdebug stack traces can also tell you what parameters are being passed to functions(this is very helpful) –  tarasm Aug 20 '10 at 4:39
add comment

This is a workflow answer, not specific to an IDE or plugin.

A solution that works really well for plugin development is to start with a local apache web server with each wordpress variation installed in a sub-folder.

In a separate location outside of the local server root, store your wordpress plugin/theme working copies. Create a symlink to the appropriate trunk/tag/branch in the /wp-content/plugins folder of each wordpress variation.

When editing the plugin in your IDE the changes you make, will obviously be represented in each wordpress install, so it becomes easy to test multiple variations of wordpress.

Essentially, you can have a browser tab open for each local wordpress variation and test each one whilst working on a single project and a single file base.

Using an IDE that supports SVN & FTP all you need to do is edit your working copy and commit your changes back to the repository.

As an IDE Coda does it for me, but I like NetBeans and Eclipse as well.

Once you are happy that your plugin works and you've committed those changes to your repository, you can then open your wordpress project and publish the changed plugin directly to your live site.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.