In this video we build out the blog section of the website using Bootstrap styling.
Restrict Access to a WordPress Site Based on IP
I recently developed an internal website for our company that wanted to be accessible to employees only. Instead of having a server level password, or individual WordPress logins, we decided to just limit access to by IP address. This way everyone on the office network could access easily, but outside the network they would get an access denied message.
We use WP Engine for hosting, but IP whitelisting or blocking should work with any host.
.htaccess Option
One quick method to set this up is by editing the .htaccess file directly (this should be in the base folder of your WordPress directory) and add the 3 lines at the top of this codeblock:
| order deny,allow | |
| deny from all | |
| allow from 98.6.000.111 | |
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.php [L] | |
| </IfModule> | |
| # END WordPress |
You’ll want to change the IP address in the example (98.6.000.111) to the IP you want to whitelist. You can also whitelist multiple IP addresses by just adding more below that line.
Plugin Option
An easier option (in my opinion) is to use the Restricted Site Access plugin, maintained by the folks at 10up. This plugin provides you with a dashboard to set up the IP restrictions, and also allows you to set a custom restriction messages or redirects.
07: Home Page Layout
In this video we build out a home page template for the theme using bootstrap styles and markup.
06: Loading Scripts and Styles
WordPress loads scripts and styles using enqueue methods. In this video, we’ll load our styles from Bootstrap and a basic javascript file.
05: Content and Template Parts
In this video we cover how the content loop works and update the templates to show actual post and page content.
04: Quick Introduction to the Command Line
In this video we make a small update to footer.php and then discuss some basics about using the command line.
03: Template Includes
In this video we break apart our base templates with a header.php and footer.php file.
02: Introduction to Template Hierarchy
In this video we create some of the base templates that most WordPress themes use (index.php, page.php, single.php and archive.php). To learn more about how WordPress loads templates, you can read this article in the codex.