Installing/Moving PmWiki Website to WebFaction - I became so frustrated when first using WebFaction for hosting as I couldn't get my PmWiki website (this website) to work. Finally got it installed; here are some things to remember...

  1. Don't panic. You can't create a folder/directory using FTP client or SSH in the webapps directory. You must first create a new application, which will create the directory.
  2. Applications menu - add new application
  3. Select PHP from app category. This creates a folder
  4. Now copy the PHP code files & folders (via FTP) to the just created application directory
  5. Websites menu, select the website you've probably already created for the domain. (If you haven't, just follow instructions on WebFaction site.)
  6. Select edit website under Options (DO NOT "add new website")
  7. Add New under Site Apps
  8. Select app you just made and assign path
  9. Click update

That gets you to the point where the files are in the right place and assigned the application to your website; HOWEVER, if you try to run the site from the URL it likely won't work. In my case, even after updating the config.php file I got "URL cannot be found 404" errors. Here's how I fixed that:

  1. Edit "index.php" to update path to pmwiki.php file (assumes you used this ploy for your website)
  2. Edit (or add file) .htaccess and add RewriteBase /<app_directory>
  3. Add set_document_root.php file to app directory which contains code:
  $_SERVER['DOCUMENT_ROOT'] = '/home/<useraccount>/webapps/<app_directory>';
  1. Edit (or add file) php.ini in app directory and add:

auto_prepend_file = "/home/<accountname>/webapps/<app_directory>/set_document_root.php"

This second set of steps should tell the server the correct paths to your PmWiki install. If you run a wiki farm, you'll have to do this for each site.

With luck, the site will now work :)

Related Posts