This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------- | |
# Rewrite all traffic to go via 'web' directory (Bedrock requirement) | |
# ---------------------------------------------------------------------- | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Adapted from: https://www.siteground.com/kb/how_to_change_my_document_root_folder_using_an_htaccess_file/ | |
RewriteCond %{HTTP_HOST} ^example.(org.uk|test)$ [NC,OR] | |
RewriteCond %{HTTP_HOST} ^(staging|www).example.(org.uk|test)$ | |
RewriteCond %{REQUEST_URI} !web/ | |
RewriteRule (.*) /web/$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## EditorConfig is awesome! ## | |
## https://EditorConfig.org ## | |
# Tutorial and examples: | |
# --> https://www.freecodecamp.org/news/how-to-use-editorconfig-to-standardize-code-styles/ | |
# List of all possible properties: | |
# --> https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties | |
# This is the top-most EditorConfig file in this project: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Set the default command line text editor: | |
sudo update-alternatives --set editor /usr/bin/vim.basic | |
# Set the default GIT push method: | |
git config --global push.default simple | |
# Set GIT user name and email in the global scope: | |
git config --global user.name "Your Name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for LAMP / cPanel | |
# | |
# This file specifies intentionally untracked files to ignore | |
# http://git-scm.com/docs/gitignore | |
# | |
# NOTES: | |
# The purpose of gitignore files is to ensure that certain files not | |
# tracked by Git remain untracked. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[push] | |
default = simple | |
[user] | |
name = Your Name | |
email = [email protected] | |
[init] | |
defaultBranch = main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------- | |
# Prevent search engines from indexing documents by file extension - useful for keeping promos secret | |
# ---------------------------------------------------------------------- | |
<IfModule mod_headers.c> | |
<FilesMatch "(\.(pdf|doc|docx|odt)|~)$"> | |
Header set X-Robots-Tag "noindex, noarchive, nosnippet" | |
</FilesMatch> | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Empty Index File | |
* Plugin URI: https://gist.github.com/ianpegg/3a4ac333c3eeaed9309fa5dc6e9fa8c0 | |
* Description: Prevents directory listing on mis-configured servers. | |
* Version: 1.0.0 | |
* Author: Ian Pegg | |
* Author URI: https://eggcupwebdesign.com | |
* php version 7.4.15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: EggMUP: Suppress Site Status Tests | |
* Plugin URI: https://gist.github.com/ianpegg/cf7317ffbaf0714e1249d6f1deef97e5 | |
* Description: Some site status tests are useful, but some are not. | |
* Version: 1.0.1 | |
* Author: Ian Pegg | |
* Author URI: https://eggcupwebdesign.com | |
* Some site status report on matters that are not important, e.g. | |
* automatic updates being disabled when the site is under version control. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: eggMUP: Deactivate WP Cron | |
* Plugin URI: https://gist.github.com/ianpegg/36568e85cf692d3a901b475e4a14204e | |
* Description: Prevents wp-cron from being run via HTTP. | |
* DISABLE_WP_CRON on its own does not prevent the wp-cron script from being | |
* executed via HTTP, meaning it is still vulnerable to exploitation by DDOS attacks. | |
* | |
* Version: 1.0.1 | |
* Author: Ian Pegg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: eggMUP: SEO Tools | |
* Plugin URI: https://gist.github.com/ianpegg/29d16c74fea470046c1dacb4f9dd3fb9 | |
* Description: Tools for SEO tweaks. | |
* Version: 1.0.1 | |
* Author: Ian Pegg | |
* Author URI: https://eggcupwebdesign.com | |
* php version 7.4.15 |