A Wordpress project starter theme/process with Timber, UiKit, Sass, Gulp, Webpack & more.
Personal setup For XAMPP projects.
-
Download Wordpress and unzip into htdocs folder.
-
Rename folder to your test domain, example: yourdomain.test.
-
Add new line to your hosts file to map your test domain to your localhost IP.
127.0.0.1 yourdomain.test -
Add new entry to bottom of XAMPP's httpd.conf file to map your project folder in htdocs to your IP mapping.
<VirtualHost *:80> ServerName yourdomain.test DocumentRoot c:/xampp/htdocs/yourdomain.test ServerAlias *.yourdomain.test </VirtualHost> -
Start up XAMPP & confirm you can connect to test domain in the browser by adding hello.html to root of new project folder and visting yourdomain.test/hello.html.
-
Create new database for project in XAMPP's phpmyadmin and setup wp-config.php file to connect to it.
-
Visit test domain URL in browser and do the wp setup/installation process.
-
Create new repo on github
-
Navigate to wp-content/themes folder of your new project in htdocs within the command line
git clone https://github.com/robmccormack89/project-starter-wp.git
-
Rename folder of theme to whatever you like. You will need to rename other parts within theme using search/replace later. Steps for that are below.
-
Navigate inside theme folder
git init
git remote rm origin
git add .
git commit -m "initial commit"
git remote add origin https://github.com/your_name/your_project.git
git push -u origin master
- The project is now cloned and set up as a new project on your github. You can now clone from that and follow the same process!
-
Rename theme folder
-
Rename 'Starter' & 'starter' references in style.css
-
Rename 'Starter' references in *.php file headers
-
Rename 'Starter' & 'starter' references in: functions.php, theme-functions.php & timber-functions.php
-
Rename 'Starter' & 'starter' references in uikit-html-widget.php
-
Rename 'starter' references in tease.twig, single.twig, no-sidebar-template.twig, left-sidebar-template.twig & right-sidebar-template.twig. Example:
{{ post.thumbnail.src('starter-theme-featured-image-archive') }}
Note: Always use Match Case!