This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| # Requires -RunAsAdministrator | |
| # Only works for WSL v2, this is completely not needed for WSL v1 where u always can use 127.0.0.1 in hosts file | |
| Clear-Host | |
| if ((Get-InstalledModule "Carbon" -ErrorAction SilentlyContinue) -eq $null) { | |
| Install-Module -Name 'Carbon' -AllowClobber | |
| } | |
| Import-Module 'Carbon' |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
| /* WordPress Cache */ | |
| define( 'WP_CACHE', true ); | |
| /* Compression */ | |
| define( 'COMPRESS_CSS', true ); | |
| define( 'COMPRESS_SCRIPTS', true ); | |
| define( 'CONCATENATE_SCRIPTS', true ); | |
| define( 'ENFORCE_GZIP', true ); | |
| /* Memory limit */ |
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |