Note: If you are using DesktopServer as your local server, you’ll need to choose the Blank (WordPress SVN) option from the Blueprint dropdown when creating a new local development site. That will create your database and wp-config.php file. Once you’ve created the site, delete the index.html and wp-config-sample.php files in the development site’s folder (wordpress-svn.dev) before you check out a copy of WordPress trunk.
You can still check out just the source code from https://core.svn.wordpress.org/trunk/ to install and test with; however, if you plan on contributing to core, it is recommended that you check out the source code, unit tests, and tools from the new repository to test, fix bugs, and create patches and unit tests with.
The steps outlined below are for installing WordPress via SVN using the new development repository.
You can also use the command line to download the latest version of WordPress trunk. Note: Do not type the $ characters from the examples below – it represents the command prompt.
Tip: you can use the cd command to change directories, and the pwd command to find out what your current directory is.
Create a directory in your local web server’s public folder called wordpress-svn using your command line client:
$ mkdir ~/wordpress-svn
Now switch to the directory you just created:
$ cd ~/wordpress-svn
Next you will check out a copy of WordPress trunk from SVN:
$ svn co https://develop.svn.wordpress.org/trunk/ .
The trailing slash on the URL, and the period at the end of the command, are both important – they make sure that downloaded files from the repository end up in the current directory. If you leave off that dot, you’ll end up creating a new installation directory called “trunk”, which is not what you want.
The following message may appear asking you to accept WordPress’ security certificate:
Error validating server certificate for 'https://plugins.svn.wordpress.org:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- Hostname: *.svn.wordpress.org
- Valid: from Thu, 21 Jun 2012 16:07:30 GMT until Wed, 15 Jul 2015 19:04:26 GMT
- Issuer: 07969287, http://certificates.godaddy.com/repository, GoDaddy.com, Inc., Scottsdale, Arizona, US
- Fingerprint: bf:08:a3:de:ab:e4:76:fd:d0:5d:10:d1:c8:de:19:12:5f:bf:71:25
(R)eject, accept (t)emporarily or accept (p)ermanently?
There are two ways you can create the wp-config.php file:
Manual: Open wp-config-sample.php in your plain text editor and enter the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST information for your local web server, then save it as wp-config.php in the root directory of your local SVN repository (e.g. wordpress-svn).
Automated: Allow WordPress to create the file during the installation process. If there is no wp-config.php file present, you will be asked to create one at the beginning of the install process.
Both are acceptable – use the method that you prefer.
Remember that you will need to create a MySQL database to install WordPress in.
If you created your wp-config.php file manually, you will be presented with the standard WordPress installation screen. You will do the famous “5 minute install” – enter your site title, desired username, choice of a password (twice), and your e-mail address, then click Install WordPress to complete the installation. Click Log In on the Success screen, enter your username and password, and configure the settings for your preferences.
If you prefer to let WordPress create the file, you will be presented with a screen asking if you want to create the file now. Click Create a Configuration File to continue. Enter your database credentials for your local web server on the third screen, as well as the database table prefix you want to use (default is wp_). After you complete all the fields, click Submit. WordPress will check that it can connect to your database with the information you provided. If successful, click Run the install to proceed.
You will then do the “5 minute install”, complete all the fields, and click Install WordPress to complete the installation. Click Log In on the Success screen, enter your username and password, and configure your settings.
Note: Under the new configuration, WordPress will create the wp-config.php file in the root directory of your local repository, not in the /src/ directory.
Your local install will be used for beta testing, fixing bugs, creating/testing patches, and running unit tests, so it is important for you to see error messages and notices. Open wordpress-svn/wp-config.php in your plain text editor, and set WP_DEBUG to true:
* For developers: WordPress debugging mode.
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
To update your local WordPress SVN install using TortoiseSVN, right-click in the root folder (e.g. wordpress-svn) and select SVN Update.
The changed files will begin downloading. Most files will show the action as Updated, but you may see some with an action of Added (indicating a new file), or Deleted (indicating a file has been removed).
Once the update is complete, you will see a message at the bottom of the window with the revision number that the update included changed files for.