Setting up an existing WordPress project/theme locally
Introduction
This is not done!!!!
Apparently, Derek got tired…
So, want to flesh it out together?? Let’s do it!
MAMP + classic download
-
Download the WordPress files
You can go to wordpress.org and click download
-
Name that folder and move it where you want the project to live
Name it something short and sweet but not obscure. The point is that it’s a clear folder/project name. Put it with like projects. If it’s a client then put it in
/clients
etc.Example:
clients/la-takedown
-
Create a virtual host
Open MAMP and create a new virtual host. Call it something short and sweet. Possibly more short than the folder name. Point it to the folder that you want to act as the server.
Save that and it’ll restart. (make sure the server is happy and running
This will create a virtual server at the
/clients/la-takedown
folder.Then you could have the host be
la
and navigate tola:8888
in the browser to visit that server. -
Create a database
You can use whatever you want. We use Sequel Pro just because we’re used to it.
Open Sequel Pro and log in with Socket: root/root
Create a database. We’d call it
la_data
(just as a convention to match the host) -
Hook up the database
Go to your
wp_config
file and add thela_data
androot
/root
for user and password. Host is localhost. Save and close it. -
"Install" WordPress
Navigate to
http://la:8888
(la:8888
) in your browser (and MAMP is on, right?) (“serving” the files in that folder)This should load a little “setup wizard” with some prompts. Follow them. It’ll set up the database and then ask you to sign in.
-
OK regular local WP is installed
But that’s just the core framework files.
-
Get the git repository theme files
There’s a repo with the actual theme files. It might have the plugins too. Each project will be different so get a firm handle on what is in the repo.
Clone the repo somewhere. Git won’t let you clone it straight into the
la-takedown
folder :/ -
Put them together
Carefully drag the folder parts over to the
la
folder. Don’t just dump the whole wp_content in there. Take the time to open up two finder windows and carefully hand-merge them together. ALSO, make sure to move the hidden.git
type files over too (and make sure they are in thela
root). -
Check it all worked
Log in to the local install.
la:8888/wp-admin
Select the theme in appearance. In a new tab, visit the front end of the site. Things might work – but they might not. This will depend on what plugins(packages) are needed and which are installed and activated.
-
Don't freak out and start over
… this is a common decision
(but will probably just lead back here)
-
Turn on the plugins
The site probably uses ACF (advanced custom fields) and other plugins. If it doesn’t have those things turned on it probably isn’t going to work!
The README should explain what to do.
Turn the plugins (that you think you need)on.
Check things out. Look for any specific errors and try and learn from them.
-
Pull down the data
The theme might kinda work but there’s no data to populate the pages and content types. The README should probably explain what the data source is and what to do.
We’ll assume that you’re using WP Migrate Pro – because that’s what we use.
You’ll need to log into the site…. sleeeeepy……