Mamp Wp



In this super simple Coding Tip of the Day, I’ll show you how to install Wordpress locally on your local computer with MAMP - a free, easy to use application. You can use MAMP to install multiple websites. You must have previously installed Wordpress in directory 'site1' before you tried to install multiple sites. Here is how to correct this - Login to MAMP phpmyadmin page and go to Database for site1.

  • I installed WordPress on my Mac Pro using MAMP and following all instructions to the letter. Immediately after installing, I was able to access the WP dashboard and install a theme. I logged out and quit MAMP. Now I am not able to access the dashboard.

    I launch MAMP and click “Start Servers” and it takes me to <http://localhost:8888/MAMP/index.php?language=English&gt;
    in the web browser (Safari 11.1.1). On that page, I click on “My Website” and it takes me to the home page of my website. No dashboard.

    What do I need to do to get to the WP dashboard and start building my website? I suspect that the answer is something simple and obvious, but I can’t find it in any of the documentation.

    The page I need help with: [log in to see the link]

  • Hey @goody2skis,

    From what I can understand initially here, you are looking for the wp-admin area of your site, where you can log in and create pages and posts etc. Is this correct?

    If it is and by “takes me to the home page of my website” you mean you see your blank WordPress website’s homepage, then you _should_ be able to visit dashboard area by appending /wp-admin to your homepage URL or by removing the index.php and replacing the URL with wp-login.php.

    _Note this is without knowing your local MAMP file paths and/or hostname setups_

    Lastly, if this doesn’t help can you please share more information on where your sites are stored in MAMP (e.g. file paths) and any screenshots of your homepage and URLs you’re attempting to visit would be great.

    Glad to hear it @goody2skis and you’re very welcome.

    So yes I does sound like the actual site files would be located here:
    Applications > MAMP > htdocs > wordpresstest (this will be your site root where the WordPress core files live)

    If you dig deeper into the wp-content folder there you will have access to whats typically the files related to your site, with the themes and plugins etc.

    One thing I think you may benefit from (if you’re new to local development or WordPress it’s self?) is to maybe use a more friendly local development environment. I personally use Local by Flywheel as it is much simpler to get a local site setup and running than the likes of MAMP.

    Let me know if you need anything further buddy.

    All the best,
    Chris 🙂

    I had the exact same problem. This was extremely helpful. Thank you so much!

    After a long struggle I downloaded wordpress using MAMP but now whenever MAMP isn’t up and running I cannot access my wordpress blog to edit, MAMP also says the demo will be running out, how do I keep my site up and running? I think I am just confused as to how wordpress.org is even run through MAMP, feel like there has to be an easier way. Thanks in advance!!

    I’ve upgraded mamp from a version with php5 to php7 so i could migrated my site to live server. After the upgrade i can access the site – it all looks fine and I can see the top line of the dashboard, but when I login I get a blank page? Can someone advise?

    thanks you

  • The topic ‘Cannot access WordPress dashboard for local WP install (MAMP)’ is closed to new replies.

About four years ago, I shared a post about WP-CLI. It wasn’t exactly a new project at the time, but it was far less developed than it is now.

As I mentioned in yesterday’s post, one of the things that we’re doing with is making sure that all of our work is unit tested from the initial version.

And when it comes to unit testing in PHP, many of us are familiar with PHPUnit; however, when it comes to unit testing plugins that are integrated with WordPress, it helps to have a test environment set up.

Sure, it’s possible to set aside a test database, test content, and then defined mock objects based on interfaces (and I’m not here to dissuade anyone from doing that). But WP-CLI offers a much easier way to go about doing just that in a more automated manner.

But first, it’s important to make sure that it’s correctly installed on your system.

WP-CLI with MAMP

First, the WP-CLI homepage offers instructions for how to install the program. I’m not out to say it’s wrong, that I have a better way, or to repeat the information.

Instead, I’m providing a way of installing the program in the context of your system that may be a bit different from what the standard set of instructions offer.

WP-CLI in the Terminal

Specifically, if you have your environment running (through something such as MAMP or another stack), then you may wish to keep all of your files self-contained within their directories so not to interfere or conflict with other software on the system.

If you’re interested in doing that, then follow along. For this post, I’m assuming that you’re running MAMP and that you’ll be installing it in the directory corresponding to the version of PHP you’re using the most.

1. The Most Recent Version of PHP

Wpb

To get the most recent version of PHP, you can enter the following line in Terminal:

$ ls /Applications/MAMP/bin/php/ | sort -n | tail -1

This should result in the following output:

php7.0.0

If you’re interested in using a different version then you can use a command line the following (which will result in php5.6.10):

$ ls /Applications/MAMP/bin/php/ | sort -n | tail -2 | head -1

Whatever the case, note the command that you use and the output that you use so that you’re able to update your profile with this.

2. Update Your Profile

Mamp Wordpress Local

Next, update your .bash_profile so that it includes the following lines of code:

PHP_VERSION=$(ls /Applications/MAMP/bin/php/ | sort -n | tail -1)

export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH

This will store php7.0.0 into a variable and will then allow you to add that to your path. If you’re not sure where to add this, enter the following command in Terminal:

$ open ~/.bash_profile

Once done, you’ll be presented with the configuration in a text editor. It may or may not have text already in it. Regardless, place the above two lines at the top of the file.

3. Download WP-CLI

At this point, you can download WP-CLI. To do this, navigate to the directory of your PHP installation on your machine.

If you’ve been following along wth the instructions this far, then navigate to /Applications/MAMP/bin/php/${PHP_VERSION}/bin where ${PHP_VERSION} corresponds to whatever version of PHP you’ve opted to use.

Next, enter the following command in Terminal:

Map

$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

This will download the WP-CLI program to your machine in the directory that you’re currently working (which should be the one corresponding to the latest version of PHP).

Free Mamp

4. Add WP-CLI to Your Path

Map Wpafb Area B

If you want to be able to access the command-line interface for WordPress anywhere on your system, then it’s a good idea to place it in your path, as well.

This way, you can take advantage of it no matter whatever directory you’re in when working with WordPress-related software. To do this, add the following line to your

To do this, add the following line to your .bash_profile directory below the lines that we’ve added above:

Mamp Web Server

alias wp='php /Applications/MAMP/bin/php/${PHP_VERSION}/bin/wp-cli.phar'

This will enable to you to use the wp command anywhere on your system.

There’s More

Wordpress

Mamp Wp-admin Error

There are additional things that can be included that make the WP-CLI installation that much better, too. These things include tab completion as well as tools for setting up unit test scaffolding as mentioned earlier in this post.

Map Wpi

For now, make sure you’re able to get WP-CLI installed and I’ll be sure to follow up with additional content in an upcoming post.