Skip to content

How to install a Terra WordPress project?

Before starting, make sure you have:

  1. XAMPP installed

    • This provides Apache, PHP, and MySQL.
    • Download here
  2. Locate the project in Terra’s repository

    • You need to know where to project repository is for next steps. Our naming convention for projects is project acronym + wp-theme. Example: btw-wp-theme, sei-wp-theme.
    • Search it in Terra’s Github
  3. Download Wordpress


Move your Wordpress to the folder htdocs (this is a folder automatically generated by XAMPP, you’ll find it in Applications) with the name of wp-projectName.

  1. Open XAMPP.
  2. Go to Manage Servers.
  3. Click Restart All (or start Apache and MySQL if they’re stopped).
  4. Confirm it’s working by visiting:
http://localhost

xampp working

  1. Go to localhost/phpmyadmin in your browser.
  2. Click on Databases at the top.
  3. Enter a name for your database (we recommend using db_projectName, being projectName the name of your project) and select Create.

phpmyadmin

4.1. Go to localhost/wp-projectName in your browser.

Section titled “4.1. Go to localhost/wp-projectName in your browser.”

Introduce the database name, in user go with root and leave password empty. Click on Submit.

wp first steps

  1. A code will appear. Copy-paste it to your wp-config-sample.php file, deleting what was before.
  1. Change the name of the file from wp-config-sample.php to wp-config.php
  2. Add these lines after the code you copy-pasted from the browser:
define('FTP_HOST', 'localhost');
define('FTP_USER', 'daemon');
define('FTP_PASS', 'xampp');
define('FS_METHOD', 'direct');
  1. Save the new file. Click Run Installation.

A new window will appear in your localhost/wp-projectName

wp second steps

Use admin for username and password (confirm you know is a weak password) and write your email. Click Install Wordpress

Create an .htacess file in your project root.

Copy this code into your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-projectName/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp-projectName/index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /wp-projectName/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp-projectName/index.php [L]
</IfModule>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
php_value upload_max_filesize 7G
php_value post_max_size 7G
php_value memory_limit 7G
php_value max_execution_time 300
php_value max_input_time 300
# Set unlimited request body size
LimitRequestBody 0
  1. Give permissions to your project using the console:
sudo chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs/wp-projectName

You’ll be asked for a password. This password is your computer’s.

  1. Log in into your local Wordpress with these credentials:
User: admin
Password: admin
  1. In your htdocs/wp-projectName/wp-content/themes you will find a folder named projectAcronym-wp-theme that the All In One carried.
  2. Delete the projectAcronym-wp-theme folder wp location
  3. Make a git clone from the Terra’s Github repository into the htdocs/wp-projectName/wp-content/themes with the same name it had before

All In One usually carries every plugin the project needs, but it’s important that you know how to use them. Every project has its own plugins, but you’ll see we work mostly with some of them. Learn how plugins work and how to install them here.

  1. Refresh the localhost. You will be logged out and admin won’t work if you try to log in.
  2. Use the credentials you used to log in into the production Wordpress (find them in the project’s Slack channel)

Your local WordPress installation is now ready! Now you have your local project connected to Github and aligned with the production project!

To see your code updates in local, you need to locally install Node.js in case you haven’t already:

Terminal window
nvm install 21
nvm use 21

This will install the Node 21 version (you can ask for the version the project needs) in your project.

To install all the dependencies of the node-modules in your local project:

Terminal window
npm install

Start working in your local project:

Terminal window
npm run virtual
  • Learn More about Wordpress Structure here
  • Learn More about making a Deploy once you’ve worked in your project here
  • Learn More about dev commands here (advanced)

Knowledge Check

Test your understanding of this section

Loading questions...