BENTECH

Complete Local WordPress Setup with XAMPP

Master local web server deployment by installing XAMPP, configuring Apache and MySQL, managing databases in phpMyAdmin, and deploying a local WordPress installation from scratch.

This hands-on course guides developers and site builders through establishing a local WordPress development environment on a Windows PC using XAMPP. You will learn how to configure web server services, manage file storage within the htdocs root, navigate phpMyAdmin to provision databases, connect WordPress configuration files to MySQL, and complete the installation wizard.

Section 1: Section 1: Local Server Stack Setup

Install XAMPP, launch web services, and resolve common configuration errors.

Lesson 1.1: Installing XAMPP and Enabling Services

  • Downloading XAMPP from Apache Friends
  • Windows UAC and Firewall permissions
  • Starting Apache and MySQL modules
  • Fixing xampp-control.ini access errors

A local web server allows you to build, test, and troubleshoot WordPress websites on your personal computer without purchasing web hosting or a domain name. XAMPP is an open-source distribution that bundles Apache (the HTTP web server), MySQL/MariaDB (the relational database), PHP (the scripting engine), and Perl. When downloading XAMPP, always download from the official Apache Friends website (apachefriends.org). Installing on modern Windows systems often prompts User Account Control (UAC) notices regarding permission restrictions if installed inside `Program Files`. Installing into `C:\xampp` avoids these permission issues. Once installed, both the Apache and MySQL services must be started in the XAMPP Control Panel. If you want these modules to start automatically when opening XAMPP, toggle autostart in the Control Panel's Config menu. Should Windows deny write access when saving this setting, close the control panel, delete `C:\xampp\xampp-control.ini`, relaunch XAMPP, and save your preferences.

Practical work

  1. Download the XAMPP installer from apachefriends.org and install it to C:\xampp.
  2. Launch xampp-control.exe and start both Apache and MySQL modules until their status indicators turn green.
  3. Open browser and confirm the web server is responsive by visiting http://localhost/dashboard.
  4. Configure autostart for Apache and MySQL, verifying no INI access errors occur.

Section 2: Section 2: WordPress Core Deployment and Database Configuration

Deploy WordPress files into htdocs and configure database privileges in phpMyAdmin.

Lesson 2.1: Deploying WordPress Core to htdocs

  • wordpress.org vs wordpress.com
  • Navigating C:\xampp\htdocs
  • Extracting and organizing site directories

To run a self-hosted instance of WordPress, you must obtain the open-source software package from wordpress.org. This package contains all core PHP scripts, default themes, and administrative files. In contrast, wordpress.com is a commercial hosted platform. XAMPP serves web files from a specific folder named `htdocs`, located inside the main XAMPP directory (`C:\xampp\htdocs`). Any directory created inside `htdocs` becomes accessible through the web browser under the `http://localhost/<folder_name>` path. You can extract the downloaded WordPress ZIP archive directly into your target folder inside `htdocs`, or extract it locally and rename the resulting `wordpress` folder to match your site's project name (for example, `bentech`).

Practical work

  1. Download the latest WordPress ZIP file from wordpress.org.
  2. Navigate to C:\xampp\htdocs and create a dedicated folder for your website project.
  3. Extract all files from the WordPress ZIP package directly into that folder so index.php and wp-config-sample.php sit at the root of your project folder.

Lesson 2.2: Database Provisioning and Final Installation Wizard

  • Creating a database in phpMyAdmin
  • Verifying root database user privileges
  • Running the WordPress 5-minute install wizard
  • Logging into wp-admin

WordPress requires a MySQL or MariaDB database to store post content, user credentials, settings, and metadata. XAMPP includes phpMyAdmin, a web-based database management tool accessible via `http://localhost/phpmyadmin`. To provision a database, select the 'Databases' tab in phpMyAdmin, enter a unique name matching your site project, and click 'Create'. By default, local XAMPP environments configure a superuser account named `root` assigned to host `localhost` with no password. After creating the database, navigate to `http://localhost/<folder_name>` in your browser to launch the WordPress installation wizard. Supply the exact database name, set the user to `root`, leave the password field completely blank, and keep the host as `localhost`. Once the database handshake succeeds, execute the install script, set your site title and administrator credentials, and log into the administrative dashboard.

Practical work

  1. Navigate to http://localhost/phpmyadmin and create a new database named bentech.
  2. Open http://localhost/bentech in your browser and select your language.
  3. Submit database connection details: Database: bentech, Username: root, Password: [blank], Host: localhost.
  4. Run the installation script, assign a site title and admin account, and sign in to the WordPress dashboard.