SF.net PT 2: Setting up a demo site

Part 1 was easy. it’s all GUI stuff, that you can figure out by poking around. Part 2 is the reason I started writing this down. The only way to maintain your sourceforge.net website, is via SSH (and by extension, sFTP). Programs you will need:

Putty and PuttyGen are just executable programs, they don’t install. After you’ve installed winSCP and rebooted, go to your SF.net Admin Menu and choose Shell/DB/web. On this page, they list the location of your web files. The important one is Path to htdocs directory: (/home/groups/P/PR/PROJECTNAME/htdocs). That’s just reference right now.


First set up our MySQL database. Halfway down the page, there’s a link to “Manage Project Databases”, which takes you to a page where you will set your passwords. I use the same password for all 3. not the most secure, theoretically, but i can’t think why i would be sharing any of the passwords with anyone. After you set your password, use the link on that page to log into PHPMyAdmin with your admin account. first thing you’ll do is create a database:


i just put wp or wordpress on the end of it, but you should leave the project number as a prefix.


To log in to your site, you need to set up an SSH key pair. Open up PuttyGen.exe. we’re going to follow these instructions. When you click ‘generate key’, you’ll see this:

do like the man says, move your mouse around.

so be ready to shake your tail feathers pointer finger, it only takes a few seconds. Once it’s generated (i didn’t bother entering a passphrase, but you might want to) edit the ‘Key comment’ field like so (the key automatically updates):

SSH key generated

Copy everything in the Public Key field, and click over to your Account maintenance page. Near the bottom, click the [Edit SSH Keys for Shell/CVS] link. Paste your key into that field. Make sure you click the “Save Private Key” button, and then close PuttyGen.


Open winSCP. on the configuration screen, click New:

new account

the private key file is the one you saved from PuttyGen a minute ago. You’ll also want to go to the directory page, and set the remote directory to your htdocs directory. Save your settings, and click Login. winSCP will warn you about the accepting the key fingerprint, click yes.

You can either unzip wordpress locally, and upload the whole thing, which takes a while, or you can just upload the *.tar.gz file and unzip it on the server. Techtite just posted an explanation of this, although there are a few differences I’ll explain in a minute.


When you open Putty.exe, you’ll need to configure it much the same way you did winSCP:
host info

key location

Save your settings, and login. You’ll be prompted for your username, and then you’ll want to type cd /home/groups/P/PR/PROJECTNAME/htdocs. Following Ajay’s instructions, the wget command doesn’t work, because your shell account doesn’t have access to anything that’s not on SF.net. so here are the commands i used:

tar xzvf wordpress-2.1.2.tar.gz
cp -rf wordpress/* ./
cp wp-config-sample.php wp-config.php
vi wp-config.php

vi is a text editor. Once it opens, the first thing you should do, is type ‘i’. That puts you into insert mode (the default is view). enter the information from the “Manage Project Databases” page, like so:
editing in vi

You can paste into Putty by placing the cursor where you want, and right-clicking on the window. And yes, we’re changing that ‘99% chance you won’t need to change this’ line. You’ll need to use the admin username and password. after you’re done editting, press ‘ESC‘ to switch back to view mode, and then ‘:wq‘ to write the file and quit.

now you’re ready to run install.php! while you’re setting up all your favorite options, you’ll note that

  • you can’t set up akismet. not sure what to do about that just yet.
  • you can’t upload files. or add custom headers. not sure what to do about that either.
  • when you edit your permalink structure, it won’t save. you’ll have to fire up vi to do that as well.

Adding your Theme

you can keep an up to date copy of your theme installed via SVN. Just:

cd wp-content/themes/
svn co http://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/trunk/ PROJECTNAME

don’t forget the /trunk. since you’re doing this via command line, you’ll need to make sure your capitalization matches.  and that last PROJECTNAME is whatever you want to call your theme folder.

The last thing you’ll need to do is add your sourceforge code.  The code is on that Shell/DB/web page, about halfway down.


5 thoughts on “SF.net PT 2: Setting up a demo site

  1. Pingback: Hosting a theme on Sourceforge, PT. 1 « SunBurntKamel

  2. adam Post author

    yeah, that’s the main drawback to sf.net. i’d love to just pull down the latest wp that way, but there’s absolutely zero outbound traffic. your tutorial on SVN was helpful in getting my mind around the process, though.

  3. options

    btw, as an alternative to vi one might would use an WinSCP Internal Text Editor or…

    open up a wonderful world of FAR a genuine state-of-the-art Orthodox File and Archive Manager that fills the gap between windows and console!

    combined with a WinSCP plugin for FAR you’ll be able to browse, find, copy/move/rename/delete, view/edit files on a remote *nix box and much more.

    you may also want to install a 7-Zip plugin to manage (view/edit/update/delete etc) archived/compressed files (Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
    Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB and NSIS).

  4. adam Post author

    Clearly, i haven’t dug into WinSCP like you have. Thanks for the resources. 7zip is cool stuff, but i had no idea it could operate remotely. i think i’m too young to truly appreciate the norton commander interface, but nonetheless it looks useful.

Comments are closed.