An advanced blog Wordpres project about coding by Noweh and Rapkalin.
mkdir your-directory-name
git clone git@github.com:Rapkalin/explain-code.git .
- cd your-directory-name
- composer install
DATABASE_NAME='your-database-name'
DATABASE_USER='your-database-username'
DATABASE_PASSWORD='your-database-password'
DATABASE_HOST='your-host'
WP_ENV=local
WP_CONTENT_URL=http://explain-code.local/
WP_SITEURL=http://explain-code.local/
# USED FOR DATABASE IMPORT SCRIPTS
PROD_HOST=
PROD_USER=
PROD_SITEURL=
DATABASE_PROD_HOST=
DATABASE_PROD_NAME=
DATABASE_PROD_USER=
DATABASE_PROD_PASSWORD=
- ServerName: explain-code.local
- Directory: your-directory-name/website
<VirtualHost *:80>
ServerName explain-code.local
DocumentRoot "/Users/r.kalinowski/Sites/explain-code/website"
ServerAlias explain-code.local.*
<Directory "/Users/r.kalinowski/Sites/explain-code/website">
Options Includes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
cd your-directory-name
php scripts/import-db.php
cd your-directory-name
php scripts/sync-uploads.php
- For each update of the newsmatic theme, you have to change/refresh website/app/themes/newsmatic-child/assets/js/theme.js to reflect the change
The explain-code.pot file is the website's base language
- Download and open the free poedit software
- Translation functions to use:
- __: Translate
- _e: Translate and displays
- _n: Translate and displays the plural
If the translation file doesn't exist in the language you want:
- Open the Poedit software
- Create a new file from the explain-code.pot file to retrieve all words to translate
- Name it with the code needed code langage. Example: en_US
If you want to add a new word to translate:
- Open the explain-code.pot file with poedit
- Go to the translate (or catalog) menu
- Click on update source code to retrieve all new translations added in the code
This directory replace the wordpress-core/wp-content native Wordpress directory. This is where you will find all the plugins, themes etc:
- W3 Super Cache: this plugin install a few files and directories:
- cache
- w3tc-config
- advanced-cache.php
- Languages: directory that handle the translations of your website. It is created by Wordpress when you configure the default language of your Wordpress website.
- Uploads: contains all the website's media files
- Plugins and themes: where are all the plugins & themes and custom plugins & themes/child-themes
To use the auto-deploy using Github Workflows please follow the below instructions:
- Commit and push your branch (feature/xxx) to main
- Wait for approval and merge
- Once the PR approved and merged, pull the changes from main
git checkout main
git pull
- Create the new tag after checking the last published here: Github Actions
git tag x.x.x
- Push the new tag, this will deploy the main branch automatically to prod
git push --tags