Wordpress : Local installation from scratch

When you want to set up a WordPress project locally.

Create a folder {myproject} under Sites/

Download last WordPress version: https://wordpress.org/download

Copy/paste content into your project folder called {myproject}

Configure your Dev (Mamp) environment

  • Create a DB: {myproject}
  • Set an local URL: {myproject}.local
  • Go to your URL to set up WordPress

 

in Sites/{myproject}/, let's configure Git

git init #to initalize a git project
touch .gitignore # need a .gitgnore file to ignore many files

 

We don't want to track all core files (and third plugins) because it makes the project too heavy.

That's why we create a powerful ".gitignore" file. Inspiration you will find here: http://bigwilliam.com/gitignore-for-wordpress-projects/

Create a new theme {myproject} : https://codex.wordpress.org/Theme_Development

You are ready to work.


BitBucket

Connect to Bitbucket.org and create a new Repo. Go back to your terminal and execute the following commands:

 

git status # only wp-content and .gitignore should be red
git add # add the folder/files
git commit -m'my intial commit' #
git remote add origin PATH/TO/REPO # check the path in BitBucket
git push -u origin --all # push to repo

 

Work locally and commit your changes. Then deploy to servers (aqualab and production)