Categories
Server Terminal

Laravel’s Artisan Command Shortcuts

php artisan route:list
composer dump-autoload
Categories
Server WordPress

If Your Permalinks Are Not Working

Be sure to have an .htaccess file in the root directory with the following in it:

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Categories
Server Terminal

Don’t Forget To CHMOD 400 Your .PEM File

When trying to SSH to an AWS instance:

CHMOD 400 yourpemfile.pem
Categories
Server

Redirect Domain and WWW Subdomain (both HTTP and HTTPS) to HTTPS Root Domain

Configure so that:

https://www.example.com
http://www.example.com
http://example.com

Redirects to:

https://example.com

Check out this answer and guide:

 

Categories
Server

Basic Authentication with .htaccess and .htpasswd

An .htaccess file in the folder you require the authentication with the following:

AuthUserFile "/home/yoursite/.public_html_wp-admin"
AuthName "Password Protected Area"
AuthType Basic
Require valid-user

An .htpasswd file (referenced in AuthUserFile in the .htaccess file) containing usernames and hashed passwords. Example:

admin:$1$M4XwC9m$e.hXbJvFOZ7n8zN0pf4Yu0

Generate hashed passwords using the MD5 algorithm here.

Design a site like this with WordPress.com
Get started