How to install wordpress via SVN

SVN is a version control system which can facilitate installation and upgradation of scripts like WordPress & make them really easy. Apart from the ease in maintenance, it also helps in saving a lot of time as compared to traditional methods of uploading files via unsecured FTP session.

You can install WordPress with a single command and that too version of your choice (even the latest development version from the trunk) and update with a single command too. I suggest you have a first hand experience in setting up WordPress as this can be geeky for novice users.

Before you continue, you would need SSH shell access to your hosting account. If you don’t have it, then its time to get in touch with your hosting partner so that they can get you one. I would recommend using Putty as your SSH client.

Visit http://core.svn.wordpress.org/ and there you can see options for tags (stable versions) and trunk (latest development copy). To choose the version, browse under the tags and there you can select the version of your choice.

To install WordPress 2.8

svn co http://core.svn.wordpress.org/tags/2.8.4/ .

Similarly, to install the latest dev version from trunk

svn co http://core.svn.wordpress.org/trunk/ .

Note the dot after the URL, it is mandatory to install it just under the present working directory. If you omit it, then it will be installed in a sub directory under the present working directory. So get to the root of the directory where you want to install WordPress and issue the command.

Now you need to have a valid wp-config.php file by filling in the database details. I also recommend changing the default table prefix and setting up secret keys.

Open the URL in the browser and follow the onscreen instructions :

  • Select Create a Configuration File
  • Select Let’s Go
  • Fill in the database connection details & click on Submit.
  • Click Run the install.
  • Fill in the Title, email and select the SE indexable option.
  • It will give you your username (admin) and a random password.

Use this to login and change the password to something you can remember under your profile under Users option.

Similarly, to update your installation

svn up

That was easy. Wasn’t it? Have your say in the comments!


Comments

7 responses to “How to install wordpress via SVN”

  1. How to you have it leave the wp-content folder out?

    Also, don’t think I have SSH access on the cloud.

  2. @preshit
    Didn’t get your point about the wp-content.
    Do you mean that the wp-content is left out in a svn upgrade? I dont think so.
    And I dont know about what you have on Cloud cuz I am just not on a cloud 😛

  3. What I meant was, how do I make the SVN update leave out the wp-content folder, so as to not overwrite anything in it when updating via SVN.

  4. @preshit
    One quick dirty way is to backup folders and then restore them such as uploads but not plugins (akismet). I dont think we can do much on the svn part as it fetches instructions from the server too and not just data but I am not sure too. I guess it requires some research work but I don’t have the time on this. Try some googling. 😉

  5. @preshit
    I got your point now. Mah bad!
    svn update just overwrites the newer files and during updates there will never be a file to overwrite in wp-content folder.

  6. […] Install WordPress via SVN (Geeky but makes upgrading super easy) […]

  7. […] the tutorial to install WordPress (manually via FTP/SFTP, via fantastico or via SVN) first and then catch up with the whole series […]