Here’s the step-by-step procedure to set up a portable web server (with Server2Go) on USB flash drive.
By the way, prior to this, I’ve tried InstantWP and XAMPP Lite but feel that Server2Go is more lightweight and more suitable and fast to be deployed on USB flash drive as a localhost web server.
First, download the Server2Go server2go_psm.zip file (as highlighted) at https://www.server2go-web.de/download/download.html :
Why the highlighted .zip file? (1) It’s the highlighted package, (2) .exe might have some issues when trying to execute. I’d go for the lower APACHE version package as I presume it’s more “stable”; anyway, this is not critical.
Unzip the downloaded package – a folder Server2Go will be created.
Copy the entire server2go folder to the USB flash drive. Tried it on the first version of USB flash drive and nearly doze off; it’s copying too slowly. Hence, use a USB 2.0 or 3.0 flash drive. A cheap 8GB flash drive is more than adequate.
Double-click the server2go folder (at USB flash drive) and then the Server2Go.exe file to start the application :
If you encounter “Shutdown Server2Go” and (default) Internet Explorer shutting down, edit the pms_config.ini file with KeepRunningAfterBrowserClose set to 1 ie. KeepRunningAfterBrowserClose=1
There, you can access https://127.0.0.1:4001/ which is the default index.php (frontpage) in htdocs default public directory :
Note that Server2Go was originally made to run off read-only CD. Hence, default setup will not retain MySQL database changes. If you want to configure the server to keep all of your settings, you need to edit pms_config.ini with LocalMirror=0 (OverwriteLocalMirror=0 and DeleteDatabaseFiles=0).
Server2Go includes phpMyAdmin at https://127.0.0.1:4001/phpmyadmin/ which you can log in with username root without any password :
You can use this phpMyAdmin to create a database ie. wpdb (with utf8_general_ci MySQL connection collation) which WordPress will need :
Next, you create a username ie. wpdbuser with all privileges granted under phpMyAdmin’s SQL tab :
CREATE USER ‘wpdbuser’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON *.* TO ‘wpdbuser’@’localhost’
WITH GRANT OPTION;
CREATE USER ‘wpdbuser’@’%’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON *.* TO ‘wpdbuser’@’%’
WITH GRANT OPTION;
You’ll need to remember the newly created mySQL database details – (1) database name, (2) database username and (3) password – for WordPress installation.