skip to Main Content

I have been given a WordPress site to work on.

I have created a parameters.yml ()

Downloaded MAMP

Created a DB with the relevant name (in phpMyAdmin)

Imported the provided DB

Set up VHost

Moved the repo to the htdocs folder (inside the mamp folder)

Run front end dependencies (npm install, grunt watch)

When I navigate to http://localhost:8888/repo_name/
or navigate to the repo_name.dev (that is what I’ve specified in vhost and is what’s in the parameters.yml) I don’t get anything.

Can someone send me in the right direction to solve this and get the site running?

2

Answers


  1. Did you edit the database contents to replace all instances of the previous site URL with your local site URL?

    That’s necessary since WordPress saves all links as absolute file paths (in the database) and won’t find anything otherwise.

    I usually open the exported SQL file in an editor and do that via search/replace, then save the file and import it in phpMyAdmin.

    Login or Signup to reply.
  2. My friend have you tried using Duplicator plugin?

    It’s the best way to move WordPress sites from server to server, that includes your localhost too and I’ve been using that.

    If you want a quick way though, on your localhost install wp-cli then run something like this

    wp search-replace 'http://prod.com' 'http://localhost:8888/repo_name' --recurse-objects --skip-columns=guid --skip-tables=wp_users
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search