March 8, 2006
WordPress on My PC Using XAMPP
I do a lot of template experimentation, loading and evaluating many themes on some of my active websites. This has some downside with search engine optimization, reader confusion, and the very real possibility that a change could make the website completely unreadable.
When I found out about loading WordPress on my computer so theme development could be done while offline, I was instantly hooked. At first I investigated John Godley’s excellent tutorial on UrbanGiraffe I downloaded WAAMPS and went through the install, and then had some hiccups modifying the httpd.conf file. While trying to find a solution, I ran across another procedure using XAMPP by Apache Friends and yet another tutorial on their website.
Now, there are some differences in the two procedures: The first modifies the httpd.conf file so that you access your website by http://local.youwebsite.com. The second simply accesses it by http://localhost. Arguably less elegant, but still perfectly acceptable. After all, this is not a website for public display; it’s for your personal web and theme development, or to keep a copy of your site on your computer for security purposes. Anyway, access by a shortcut will make most of these differences moot.
Back to the install. I simply followed the tutorial, then created the MySql database using the WordPress codec. I modified the wp-config-sample.php file to agree with the database, then saved as wp-config.php and then installed WordPress by moving it into the httdocs folder. Simply move the files to the folder..done.
The wp-config-sample.php file is shown below. You should only have to change the username and password. Regardless, just make sure the information you insert here is the same as that you used to setup the database.
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');/* That's all, stop editing! Happy blogging. */
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>
Start your Apache server, and MySql database using the XAMPP Control Panel, then start WordPress, just as you would on the remote server. Very neat, and convenient when the internet isn’t available.
Some port must be open: 80, 81, and 443 for Apache, 3386 for MySql. Other ports may be required for other services, but the above are all needed for a WordPress operation. XAMPP provides an excellent port checker, which will tell you any program which is blocking these ports. Windows XP firewall, and other firewalls might also need tweaking.
Filed under Blog, Mr Blogmeister, WordPress, WordPress on Computer, XAMPP by Mr Blogmeister














Leave a Comment