Search code examples
wordpressmamp

Multiple Wordpress websites on MAMP


have a quite simple question here. I have installed MAMP and have folder on my desktop called MAMP which is set as a root. Inside are two installations of Wordpress, site1 and site2. Site1 already has database and site itself is completely designed. I wanted to start second site so I added wordpress installation files to site2 folder. If I now want to access site1 or start new installation for site2, I go to my browser and write localhost:8888. Here I will get choice to enter site1 or site2. If I click site2, as expected, I have Wordpress menu and I can start new installation. On the other hand if I click on site1, it takes me to my originally built website which now looks really bad(95% of design is missing, everything is messed up and I get 404 error). If I change root, and instead of MAMP i choose MAMP/site1 , then I can access directly localhost:8888 and I will see my site1 with its full design and functionality. So just a simple thing, changing the root directory for MAMP will make my site1 lose all its functionality. Where is the problem? I have following instructions from a youtube tutorial and I can see it is perfectly possible to run two sites simultaneously on MAMP. This is what I am trying to do: https://www.youtube.com/watch?v=25ole-BzQcA


Solution

  • 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 -

    1. Login to MAMP phpmyadmin page and go to Database for site1.
    2. Look for table 'wp_options' or _options
    3. Look for option_name 'siteurl' and 'home' - this for your setup will be 'localhost:8888'
    4. Change siteurl and home to 'localhost:8888/site1'

    Try to hit website http://localhost:8000/site1 and this should fix the problem.