What XAMPP gives you, and what it does not
XAMPP puts Apache, MySQL, PHP, and phpMyAdmin on your own machine in one installer. That is enough to run WordPress offline, test a plugin, or build a site before it has a host. It is not a production server and it is not a true staging copy of your live site.
| XAMPP on your laptop | Live hosting | |
|---|---|---|
| Who can reach it | Only your computer | Anyone on the internet |
| PHP version | Whatever the installer shipped | The host's managed version |
| Database | MySQL with a blank root password | Separate database and user with a password |
| Caching and CDN | None | Server cache, object cache, CDN |
| Safe for real traffic | No | Yes |
Because the PHP version and the caching layer differ, a site that runs perfectly in XAMPP can still fail on the host. Treat a local install as a place to build and test content, not as proof that the live site will behave the same way.
Install XAMPP and start the two services
Download the installer from the Apache Friends site, choosing a build with PHP 8.2 or newer for current WordPress. During setup you can deselect the extras and keep Apache, MySQL, PHP, and phpMyAdmin.
- Run the installer, accept the default location, and finish setup.
- Open the XAMPP Control Panel and click Start next to Apache, then Start next to MySQL. Both module names turn green when they are running.
- Open
http://localhostin a browser. The XAMPP dashboard confirms that Apache is serving. - Check MySQL by opening phpMyAdmin from that dashboard. If the login page loads, the database service is up.
You know this step worked when both modules stay green for a minute and localhost shows the dashboard rather than a browser error. If Apache flashes green then stops, you have a port conflict, covered below.
Create the database in phpMyAdmin
WordPress needs an empty database before the installer can run. Locally you do not need a separate database user, because XAMPP's root account with a blank password is meant for this machine only.
- Open
http://localhostand click the Databases tab./phpmyadmin - Type a name such as
wp_local. Use lowercase letters and underscores, no spaces. - Choose
utf8mb4_unicode_cias the collation, which is what WordPress expects for emoji and non-Latin text. - Click Create. The empty database appears in the left column.
If you plan to keep several local sites, give each one its own database and its own folder name, so a plugin test on one site cannot touch another.
Put WordPress in the htdocs folder
The htdocs folder is the document root of your local Apache. A folder inside it becomes a site at http://localhost.
| System | htdocs location |
|---|---|
| Windows | C:\xampp\htdocs\ |
| macOS | /Applications/ |
| Linux | /opt/lampp/htdocs/ |
Download latest.zip from wordpress.org, create a folder such as mysite inside htdocs, and extract the WordPress files into it so that wp-admin, wp-content, wp-includes, and index.php sit directly in that folder. If you end up with htdocs/mysite/, the site will open one level too deep and the installer will complain about missing files.
Run the installer at localhost
Open http://localhost. The welcome screen asks for the database details, then the site details, then hands you a login.
- On the database screen, enter
wp_localas the database name,rootas the username, leave the password empty, and keep localhost as the host. - Leave the table prefix as
wp_on a local site, then submit. - If WordPress cannot write wp-config.php, it prints the file contents instead. Create
wp-config.phpin the site folder, paste that text, save, and click Run the installation. - Fill in the site title, an admin username that is not "admin", a strong password, and your email. Leave search engine visibility unchecked, since the site is local.
The install is complete when the login page appears at /wp-login.php and the dashboard loads. Bookmark the address, because Apache and MySQL must both be started each time you reboot the machine.
Fix the port conflict and the other local errors
Local stacks fail in a small number of predictable ways. Most of them are one setting in one file, and the file is named in the XAMPP control panel.
| Symptom | Cause | Fix |
|---|---|---|
| Apache will not start | Another program owns port 80, often IIS, Skype, or a printer service | Stop that program, or set Listen 8080 in httpd.conf and use localhost:8080 |
| MySQL shuts down immediately | Port 3306 is already in use by another MySQL install | Stop the other service, or change the port in my.ini and in wp-config.php |
| phpMyAdmin returns 403 | Access is limited to local requests | Edit the Alias block in httpd- |
| Upload fails at a few megabytes | PHP limits are low by default | Raise upload_max_ |
| Plugin install times out | max_ | Raise it in php.ini and restart Apache |
After any php.ini change, restart Apache from the control panel. PHP reads the file at start-up, so a running server keeps the old limits and the same error appears again.
Move the local site to a real domain
A local site contains hundreds of references to http://localhost. Uploading the files and importing the database without changing those strings gives a live site that redirects back to localhost, which is the most common migration failure.
- Export the database from phpMyAdmin as SQL, and zip the site folder.
- On the host, create a database and user, upload the files, and import the SQL file.
- Run a search and replace on the database, changing
http://localhostto/mysite https://, using a tool that handles serialised data such as WP-CLIyourdomain. com search-replaceor a migration plugin. - Update the database credentials in wp-config.php, then log in and resave permalinks.
Do the search and replace before you log in, not after. Widgets and theme options store serialised arrays, and a plain text editor replace corrupts them, which is why the tools above exist.
From localhost to a live site on WebJi
When the local build is ready, WordPress hosting puts it on a server with PHP, MySQL, and certificates handled for you. Plans start at ₹400 per month before 18% GST, with a one-year term at ₹3,000.
If you would rather not run the search and replace yourself, the migration service moves the files and database for a one-time ₹700, covering up to five MySQL databases and 5 GB. Free migration is also available subject to terms and approval. Email support@webji.
Frequently Asked Questions
How do I install WordPress on XAMPP?
Install XAMPP and start Apache and MySQL, create a database in phpMyAdmin with utf8mb4_
Is XAMPP good for learning WordPress?
Yes. It runs the same PHP and MySQL stack WordPress uses, costs nothing, and keeps experiments off a live site. It is not a production server, and it does not replicate your host's PHP version, caching, or server limits.
How do I create the WordPress database in phpMyAdmin?
Open http://localhost
Why will XAMPP Apache not start?
Port 80 is already taken, usually by IIS, Skype, or another web server. Close that program, or open httpd.conf from the Apache Config button and change Listen 80 to Listen 8080, then use http://localhost
Can I move my XAMPP site to live hosting?
Yes. Export the database, upload the files, import the database, and replace http://localhost
What is the default phpMyAdmin password in XAMPP?
There is no password. XAMPP ships MySQL with a blank root password for local use, which is why the installer accepts an empty field. That default is one reason XAMPP must never be exposed to the internet.

