← All posts

MAMP Project List Script with WordPress Login Links and Password

If you keep many projects in one local server folder, opening localhost in MAMP only shows the default welcome page. To reach a site you type the folder name into the address bar, then type /wp-admin or wp-login.php by hand to log in. This free project list script swaps that page for a clean list of every folder. Each one links to the install, and WordPress sites get a direct Login link. There is also a password-protected version, so you can show the same list on a live dev server without making it public.

The problem with the default MAMP localhost page

With regular MAMP (not MAMP Pro) or a similar local server, localhost:8888 shows the Welcome to MAMP placeholder page. It has server details but no links to your projects. So every time you want to open a site, you:

  1. Type the project folder name into the URL by hand, for example localhost:8888/wordpress-install-1.
  2. Add the login path by hand to get to the WordPress login screen.

It only takes a few seconds, but you repeat it every time you switch projects, and the typos add up.

Install the project list script

The download is a folder called Projects-folders-listing-master with two subfolders, Folder listing and Folder listing with login. Each one has its own index.php.

  1. Open your server's document root. In MAMP that is /Applications/MAMP/htdocs.
  2. Copy the index.php from Folder listing into htdocs, replacing the default MAMP index.php.
  3. Reload localhost:8888.

You now get a Projects list page with every folder in htdocs. In our demo those were wordpress-install-1, wordpress-install-2, html-project and the script folder itself.

Direct links to each install and its login screen

This page saves you the typing. Each project name links to its install, which opens in a new tab. If a folder is a WordPress install, the script detects it and shows a Login link on the right that takes you straight to the WordPress login screen.

Folders that aren't WordPress, like html-project in the video, show no Login link. You don't have to set anything up for this. The script checks each folder for you.

Password-protected version for a live dev server

A plain folder list is fine on your own machine. On a dev server that other people can reach, you don't want anyone who guesses the URL to see all your client projects. For that case, use the index.php from Folder listing with login.

Visitors first see a password field. After they enter the correct password and press Login, they get the same Projects list with install and login links, plus a Logout button at the bottom.

Set your own password

The password is a plain value in the script file. There is no settings screen, so you change it in any code editor.

  1. Open the index.php from Folder listing with login in your code editor.
  2. Find the password check near the top of the file (line 6 in the video) and replace the value with your own password.
  3. In the video, logging in still didn't work after that one change, because the password also appears a second time, around line 28. Change it there too.
  4. Save, reload the page and log in with the new password.

This is the start of the file as shown in the video, with the test password 1111:

    session_start();
    $error = '';
    if(isset($_POST['submit_pass']) && $_POST['pass']){
        $pass = $_POST['pass'];
        if($pass == "1111"){
            $_SESSION['password'] = $pass;
        }
        else {
            $error = "Incorrect Password";
        }
    }

The session stores the password after a successful login, and the page_logout check further down clears it when you press Logout.

Who is this for

  • WordPress developers using MAMP or a similar local server who are tired of typing project URLs and login paths by hand.
  • Freelancers and agencies with many client installs in one htdocs folder who want a single page to jump into any of them.
  • Anyone hosting several projects under one domain on a dev server who wants a project overview behind a simple password.

FAQ

How do I replace the default MAMP localhost page? Copy the script's index.php into your document root (/Applications/MAMP/htdocs in MAMP) so it replaces the default index.php. Reload localhost and you'll see the project list.

Does it detect WordPress installs automatically? Yes. The script checks each folder, and if it finds WordPress it adds a Login link that goes to that site's login screen. Other folders only get the install link.

How do I change the password in the protected version? Open index.php from Folder listing with login in a code editor and replace the password value. In the video it appears in two places, around line 6 and line 28. Update both, or the new password won't work.

Do I need the password version on my local machine? No. Use the plain Folder listing version locally. Keep the login version for a live or shared dev server where other people could open the page.

Get Projects List with Password → dplugins.com