Quick answer: If you installed WordPress on your computer in a folder called wordpress using XAMPP, MAMP or WampServer, open http://localhost/wordpress/wp-admin in your browser (MAMP may use a port, e.g. http://localhost:8888/wordpress/wp-admin). Make sure your local server’s Apache and MySQL are running. If you use a tool like Local, click WP Admin in the app — it opens the right address (often a local domain like yoursite.local/wp-admin).
What is localhost?
localhost means “this computer”. When you install WordPress locally, your computer acts as a web server, so only you can see the site. It’s perfect for learning, testing themes and plugins, and developing before going live.
Find the right local URL
| Tool | Typical dashboard URL |
|---|---|
| XAMPP (Windows/Mac/Linux) | http://localhost/wordpress/wp-admin (folder in htdocs) |
| WampServer (Windows) | http://localhost/wordpress/wp-admin (folder in www) |
| MAMP (Mac/Windows) | http://localhost:8888/wordpress/wp-admin (default port) or without port if set to 80 |
| Local | Click “WP Admin” — e.g. http://yoursite.local/wp-admin |
The middle part of the URL is the folder name. If your folder is called mysite, the address is localhost/mysite/wp-admin.
How to log in
- Start your local server (Apache and MySQL) or start the site in Local.
- Open the URL above in your browser.
- Enter the admin username and password you created during installation.
Haven’t installed WordPress locally yet? Follow method 3 in our installation guide.
Fixes for common localhost problems
“This site can’t be reached” or “connection refused”
The local server isn’t running. Open XAMPP/MAMP/WampServer and start Apache and MySQL. In Local, click Start site.
404 Not Found
The folder name or location is wrong. Check WordPress is inside htdocs (XAMPP) or www (WampServer), and that the URL matches the folder name exactly — it’s case-sensitive on some systems.
Apache won’t start (port conflict)
Another program is using port 80 or 443 (for example Skype, IIS or another local server). Close it or change Apache’s port, then use that port in the URL (e.g. localhost:8080/wordpress/wp-admin). Don’t run XAMPP and Local at the same time.
“Error establishing a database connection”
MySQL isn’t running or the details in wp-config.php are wrong. Local setups often use user root with an empty password (XAMPP) or root/root (MAMP). Some users fix it by changing DB_HOST from localhost to 127.0.0.1. See database connection fixes.
Redirects to a live website
If you copied a live site to your computer, its database still contains the live URL. Update siteurl and home in the wp_options table, or add this to wp-config.php:
define( 'WP_HOME', 'http://localhost/wordpress' );
define( 'WP_SITEURL', 'http://localhost/wordpress' );
Forgot your local password
Use phpMyAdmin (usually localhost/phpmyadmin) to edit the wp_users table and set a new password with the MD5 function. See login fixes.
Blank white page
Enable debug mode to see the error — see WordPress debug mode.
Local tools compared
| Tool | Ease of use | Best for |
|---|---|---|
| Local | Very easy | Beginners and designers; one-click sites |
| XAMPP | Medium | Learning how servers work |
| MAMP | Easy–medium | Mac users |
| WampServer | Medium | Windows users |
| Docker-based tools | Advanced | Developers and teams |
What to use a local WordPress site for
A local install is the safest playground you’ll ever have. Use it to try new themes and page builders, test plugin combinations before adding them to your real site, learn how WordPress files and the database work, and practise fixes like disabling plugins or restoring backups. Developers use local sites to build custom themes and plugins, often with version control. Because nothing is public, you can break things without consequences — just delete the site and start again.
Keeping local and live sites in sync
If you use a local copy to test changes for a live site, refresh it from a recent backup of the live site first, so you’re testing on real content and settings. After testing, apply the same updates on the live site (or push files with a deployment tool). Avoid pushing a local database over a live site that has new comments, orders or users.
Moving a local site online
When you’re ready to go live, use a migration plugin to package the local site and import it on your host, then update URLs. See how to move a WordPress site. Remember to set strong passwords — local sites often use weak test passwords.
Frequently asked questions
Can other people see my localhost site?
No, only your computer (unless you share it with special tunnelling tools).
Is local WordPress free?
Yes — WordPress and most local server tools are free.
Why does my localhost URL include :8888?
That’s MAMP’s default port. You can change it to 80 in MAMP’s settings.
Can I install plugins on localhost?
Yes, as long as your computer is online to download them.
Final thoughts
Start the server, match the folder name and you’re in. Local is the easiest tool for beginners; XAMPP teaches you more about how WordPress runs.
A real-world example
A student learning WordPress installed it locally with a desktop tool, but typing localhost/wordpress/wp-admin showed “This site can’t be reached”. The local server simply wasn’t running — the app had to be started first. Once it was running, the address loaded, but redirected to the wrong port. The site URL in the database pointed to localhost without the port number the tool used. Updating the siteurl and home values to include the correct port fixed it. Most localhost problems come down to these two things: the server isn’t running, or the site address doesn’t match how you’re visiting it.
Keep local and live PHP versions in step
Your local setup should use the same PHP version as your live host, so code that works locally also works online. This became especially important after the October 2026 PHP2Shell vulnerabilities, when many hosts upgraded or patched PHP urgently. If your local tool lets you choose PHP versions, match your host’s version and update it when your host does. That way you’ll catch compatibility problems on your computer, not on your live site.
Moving a local site online
When your local site is ready, you can move it to real hosting with a migration plugin or by copying the files and database manually. Remember to replace localhost addresses with your real domain in the database, using a search-and-replace tool that handles serialised data correctly. Our migration guide walks through each step.
Why developers love local WordPress
A local install is free, fast and private. You can test new themes and plugins, try code snippets, practise updates and break things without any risk to a live site or visitors. Pages load instantly because there’s no network delay, and you can work offline. Many developers build entire sites locally, then move them to hosting once they’re finished. Even if you never write code, a local site is a great sandbox for learning WordPress.
If you get stuck, your local tool’s documentation usually covers the most common address and port problems.
Quick fix checklist
Check that your local server app is running, that you’re using the right folder name and port, and that the site address in Settings matches the address in your browser.
WordPressPrime.com is an independent guide and is not affiliated with the WordPress Foundation, WordPress.org or Automattic. Always back up your website before making changes, and check official sources for the latest details.
