Hosting two wordpress sites on MAMP local host

101 Views Asked by At

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.

1

There are 1 best solutions below

0
Johannes On

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.