I have been trying to host two wordpress sites of MAMP, and the tutorials I have seen – https://www.youtube.com/watch?v=25ole-BzQcA, already have the wordpress files inside a folder that was already inside htdocs. I did not have my first wordpress site’s files inside a folder, they are just inside the htdocs.
When I make a folder and put these files in it, I am unable to access the wp-admin (404 not found) although the first wordpress site is still working. Because of this I am also unable to create a second wordpress site because there is no local host where the two site’s urls can be found and localhost:8888 directly goes to the first website. I also tried changing wp_options in phpmyadmin database for the first website, but so far nothing has worked.
2
Answers
Unfortunately, I don’t have enough reputation to just comment your post so I’ll edit this one with more information. I’ll still try to help with the little information:
I don’t really understand, do you want two completely different websites on your MAMP:
Or you try to have to website with one has a subdomain of the other? As:
site 1
From what I remember from a previous installation I did, it was just two folders with WordPress in each one having a different database
When you write localhost you should have the index of all your sites normally. Try removing the 8888
A quite simple solution would be to use a migration plugin, for example "Duplicator" (https://wordpress.org/plugins/duplicator/). If your website isn’t too big (content-wise), you should be able to use the free version for this.
With that you could export your existing WP site, then create a folder inside your
htdocs
folder (and another empty database) and then use Duplicator to install that website in that folder and that new database. Duplicator will take care of all the filepaths and database entries.After that you can delete the previous files of your initital website, create a second folder inside htdocs (plus another database) and create a new WordPress site in there.