T U T O R I A L S E R I E S
Putting WordPress on a USB stick
Why ??
Because you might want to take a fully working install into several places to demonstrate the program.
Because you want to work on your blog theme while at the office.
and probably a whole lot more.
It is very easy to do.
There are 2 ways described:
Webserver On a Stick (Windows reports a Size of 121MB and a Size on Disk of 134MB).
Xampplite (Windows reports a Size of 89.3MB and a Size on Disk of 96.1MB)
Whichever you use, you must see The Note at the Bottom. Kudos due to
Boredworkers for the port clash and the feed problem.
UPDATE: You can download packages and applications from
http://www.chsoftware.net/en/useware/wosmixer/wosmixer.htmThanks to Harald for emailing me with the information.
Open the folder you just copied over.
Click
start.exe
then ....
Enter 'wordpress'.
Click Create
Copy your complete WordPress directory into the
/www/ directory of WOS.
Now open the folder and open the file
wp-config.php. This is the information you need:
define('DB_NAME', 'wordpress');
define('DB_USER', '');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
If you are carrying around data on a USB stick I would hope you have protection for that data - so creating a user here is of no consequence.
Save the
wp-config.php
Now you
install WordPress.
It should work just like it always does - except you shouldn't get the email notification of course.
Permalinks.
I have no idea why someone would want pretty permalinks for a USB WP.... but you need to open the
E:\wos\apache2\conf directory. Open the file
httpd.conf. Find this line:
#LoadModule rewrite_module modules/mod_rewrite.so
Remove the #
Save the file
Stop WOS then restart it.
This does work for me - honest
Xampplite
Download a copy of
Xampplite.
Run and extract the contents to a folder.
Copy to your USB stick. (In my case this is Drive E)
Open the folder you just copied over.
Click
xampp-control.exe
then start Apache and mySQL
Enter 'wordpress'.
Click Create
Copy your complete WordPress directory into the
/htdocs/ directory of xampplite.
Now open the folder and open the file
wp-config.php. This is the information you need:
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
If you are carrying around data on a USB stick I would hope you have protection for that data - so creating a user here is of no consequence.
Save the
wp-config.php
Now you
install WordPress.
It should work just like it always does - except you shouldn't get the email notification of course.
Note: Using xampplite and commenting out the mod_rewrite line in httpd.conf I could not get pretty permalinks.
The Note at The Bottom
1. The Port
Apache uses Port 80 and if something else is occupying that port, it will not start. IIS uses that port as do other apps - I'm told Skype does. If this happens, change xampp.
Open E:\xampplite\apache\conf\httpd.conf and find this line:
Listen 80
Change that number to another. Try 123. Save the file. Stop Apache then restart Apache.
2. The Index
The index inside your USB install still wants to pull the RSS feeds in. For what you are using WP in this way, this is very probably an annoyance. To beat that, open E:\xampplite\htdocs\wordpress\wp-admin\index.php and edit that large file down to these few lines:
<?php
require_once('admin.php');
$title = __('Dashboard');
require_once('admin-header.php');
require_once (ABSPATH . WPINC . '/rss-functions.php');
$today = current_time('mysql', 1);
?>
<?php
require('./admin-footer.php');
?>
then save the file. This empties the dashboard screen completely of content but does not harm the blog.
These pages are independent of http://wordpress.org
All design, content & images © Mark 2004-2008. All rights reserved.