Hosting von Websites auf meinem lokalen Server mit mamp in mac

566
Vishwanath Singh

Ich möchte eine Wordpress-Site lokal auf meinem MAMP-Server hosten. Dies ist die von mir befolgte Prozedur: 1.Das Duplizierer-Plugin auf der Site installiert und das Site-Paket erstellt. 2.Laden Sie das Installationsprogramm und die Archivdatei sowie die Datei installer.php aus dem Paket herunter. 3.Erstellte die Datenbank in phpmyadmin mit dem MAMP-Server. 4.Die Archivdatei und das Installationsprogramm wurden in einen Ordner in MAMP / Applications / htdocs verschoben. 5.Versuch beim Öffnen von localhost / foldername / installer.php.

Nachdem Sie alle diese Schritte ausgeführt haben, erhalten Sie den Fehler und können ihn nicht lokal ausführen. WordPress ist bereits auf dem lokalen Host installiert. Schlagen Sie die Lösung für dieses Problem vor.

0
Wenn Sie "Fehler bekommen" sagen, welcher Fehler wäre das? ssnobody vor 8 Jahren 1
Sein Fehler 404 wurde nicht gefunden Vishwanath Singh vor 8 Jahren 0
404 nicht gefunden bedeutet, dass es nach DocumentRoot / foldername / installer.php sucht und kann es nicht finden. Ich würde prüfen, ob der DocumentRoot auf den richtigen Ort zeigt. ssnobody vor 8 Jahren 0

1 Antwort auf die Frage

0
Samad

Sie können eine Site alternativ auf localhost kopieren, ohne ein zusätzliches Plugin zu verwenden.

Schritte:

1. Export the database using phpmyadmin interface and save that as a .sql file.  2. Extract wordpress.zip file downloaded from wordpress.org to MAMP/htdocs.  3. Copy wp-content folder and wp_config.php from old site and Paste it under new wordpress folder.(Replace the files)  4. Create a database in new host with same database name and import the .sql file.  5. Goto localhost:8888 in your browser. (Before this, you need to change document root to this wordpress folder by using preferences in MAMP) You will get your site. 

Anmerkungen:

If you find any old urls in your site, (Broken urls to media items) You can do a search and replace in database using the following sql queries. Do this one by one inside your wordpress database.  UPDATE wp_posts SET guid = replace(guid, 'http://old-site','http://new-site');  UPDATE wp_posts SET post_content = replace(post_content, 'http://old-site', 'new-site');  UPDATE wp_postmeta SET meta_value = replace(meta_value,'old-site','new-site');