Archives for 

wordpress

WordPress Development Environment on your USB Stick / Dropbox Dir

I needed a pretty quick and dirty WordPress development environment on my Dropbox dir to work on a WordPress plugin hosted @wordpress.org at random / wherever so… quick one:

1. Download “Server2Go” (http://www.server2go-web.de/download/download.html) : take the version including MySQL

2. copy it to folder \app\server2Go in your Dropbox Dir

3. Change the pms_config.ini file inside the \app\server2Go to

a) keep your MySQL databases after closing down (and maybe add a nice startup pic yourself) and b) have a default root dir “wordpress”

image

4. Fire it Up (\app\server2go\server2go.exe) and open up http://127.0.0.1:4001/phpmyadmin/ , login in as root  without password (as usual) and … as usual: a. create a new empty database for your WordPress project and b. create a new user to be used as the WordPress DB User

image

5. Download WordPress : http://wordpress.org/download/  and extract it to \app\server2go\wordpress\ (this is the root directory you have just indicated in the pms_config)

6. Open WordPress via the browser (http://127.0.0.1:4001) and walk through the setup process to create your database contents and the wp-config.php.

7. Download Eclipse at https://www.eclipse.org/downloads/ , extract Eclipse to \app\eclipse

8. Open Eclipse and install SVN (under help > install new software > “http://download.eclipse.org/releases/kepler” > Collaboration > choose the SVN plugin you need, install it and restart

image

9. Identical : also install PHP development Tools:

image

restart Eclipse (when working with SVN first time choose the JavaHL SVN provider also during the wizard)

DONE

For Example: I assume you want to quickly to some editing on a plugin you are working on which is versioned @wordpress.org (http://wordpress.org/plugins/):

1. Create a new PHP project in Eclipse and “use existing location” and point to the PLUGIN directory in WordPress of the specific plugin e.g. \app\server2go\wordpress\wp-content\plugins\MYPLUGIN  (the directory DOES NOT HAVE TO EXIST)

image

2. Now … rightclick on the new project and choose  Team > Share Project and Point to the WordPress SVN Location your Plugin is located in (yep, the Trunk location) : it will start fetching the latest stuff and place it locally.

image

3. Now you can work on the plugin and once you have a new version (remember to update the readme.txt version number and the version number in your main plugin file) you can  “commit” your stuff to the repository

4. If you want to create a new tag you choose TEAM > TAG and you only fill in the version number e.g. 0.0.3  : it will auto copy the latest trunk to /tags/0.0.3 in your WordPress SVN Repository so the world can download it.

BONUS:

Reference the WordPress folder in the PHP include Path > Libraries and you can lookup the WordPress definitions of classes.

image

Additionally:

Install the portable edition of WinScp next to it, so you can SSH / copy your stuff over to the production server also while you are busy.

Install NotePad++ portable also because sometimes you might run into some BOM problems using Eclipse and copying over the SVN WordPress.org files. (“header already send”) : fix it with the convert to UTF-8 without BOM in NotePad++ (but BE SURE Eclipse is close while doing it!) (really!)

image