Installing via SVN

Overview

This article will walk you through installing the latest WordPress development version via Subversion (SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase.).

Top ↑

What You Will Need Before Starting

Top ↑

Installing WordPress Using Subversion

The 3.7 release cycle brought a restructuring of the SVN repository, to bring the code, unit tests, and tools together in one place for core contributorsCore Contributors Core contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. to work with.

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 coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., 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.

Top ↑

1. Check Out WordPress Trunk

Top ↑

1.1 Using TortoiseSVN

Create a folder in your local web server’s public folder (/htdocs or /www) called wordpress-svn. Open that folder, right-click and select SVN Checkout.

TortoiseSVN Checkout Context Menu Screen

You will be presented with the checkout window. Enter the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org of the wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ SVN repo in URL repository field.

TortoiseSVN Checkout Window Screen

The files will begin downloading to that folder.

TortoiseSVN Checkout File Download Screen

The green checkmark you see over the icons for the files and folders indicates that is now a versioned file. If you don’t see that icon, refresh the folder content list.

Top ↑

1.2 Using Command Line

You can also use the command line to download the latest version of WordPress trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision.. 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!
Certificate information:
 - 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?

Type p to accept it permanently.

Top ↑

2. Creating wp-config.php

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 MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. database to install WordPress in.

Top ↑

3. Run the Install Script

In your web browser, navigate to http://localhost/wordpress-svn/src/ to run the installation process.

For those using Windows 11: If you have not previously installed npm and grunt you will get an error with suggested npm commands. Download and install Node.js from here: https://nodejs.org/download/release/latest-v20.x/. Before attempting to run the suggested npm commands, open a command window and navigate to your wordpress-svn directory. Issue the following command: npm install -g grunt-cli – This installs the grunt client. Then add grunt to your wordpress instance using:
npm install grunt --save-dev
npm run dev should now complete the process of unpacking the WordPress install.

Upon browser refresh you should get the response as described below. These directions are described in more detail at https://gruntjs.com/getting-started.

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.

Top ↑

4. Edit wp-config.php

Your local installLocal Install A local install of WordPress is a way to create a staging environment by installing a LAMP or LEMP stack on your local computer. will be used for betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 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.
 */
define('WP_DEBUG', true);

Top ↑

5. Updating Your Subversion Install

You will need to run the latest version of WordPress trunk on your local SVN install while testing, fixing bugs, and contributing patches.

WordPress 3.7 introduces automatic updates for minor stable WordPress releases (3.7.x). This feature, by default, does not work for Subversion installs.

You will need to manually update your local SVN install. The instructions below are for updating to the latest version of WordPress trunk using either TortoiseSVN or the command line.

Top ↑

5.1 Using TortoiseSVN

To update your local WordPress SVN install using TortoiseSVN, right-click in the root folder (e.g. wordpress-svn) and select SVN Update.

TortoiseSVN Update Local Subversion Screen

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.

Top ↑

5.2 Using Command Line

To update your local WordPress SVN install using the command line, open your command line client and change the directory to your WordPress SVN install:

$ cd ~/wordpress-svn

You will then use the SVN update command to download any changed files from the WordPress Subversion repository:

$ svn up

Top ↑

Next Steps

Top ↑

Learn More

Last updated: