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
| # Change [/home/public_html/yourwebsite/] to your absolute path | |
| # Create a .htpasswd file | |
| # Add guest:/ls2opk3b1puY >> login: guest | pw: guest | |
| AuthUserFile /home/public_html/yourwebsite/.htpasswd | |
| AuthName "Type Password" | |
| AuthType Basic | |
| Require valid-user | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |
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
| // Minify HTML on The Fly Wordpress | |
| // http://ermawan.com/php-minify-html-on-the-fly | |
| function minify_html($buffer) { | |
| $search = array( | |
| '/\>[^\S ]+/s', // strip whitespaces after tags, except space | |
| '/[^\S ]+\</s', // strip whitespaces before tags, except space | |
| '/(\s)+/s' // shorten multiple whitespace sequences | |
| ); | |
| $replace = array( | |
| '>', |
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
| <Files *.php> | |
| deny from all | |
| </Files> |
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
| # v19 2025-11-06 | |
| # prevent listing files in folders | |
| Options -Indexes | |
| # some security rules | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # prevent php execution in uploads | |
| RewriteRule /uploads/.*\.php - [F] |
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 | |
| class WP_HTML_Compression { | |
| protected $compress_css = true; | |
| protected $compress_js = true; | |
| protected $info_comment = true; | |
| protected $remove_comments = true; | |
| protected $html; | |
| public function __construct($html) { | |
| if (!empty($html)) { |
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
| /*-----------------------------------------------------------------------------------*/ | |
| // Register and Minify Core Stylesheets | |
| /*-----------------------------------------------------------------------------------*/ | |
| function st_registerstyles() { | |
| // minify folder name (must be in your wp root). | |
| $minpath = '/min'; | |
| // define directories | |
| $child_theme = str_replace(site_url().'/wp-content/themes/', '', get_bloginfo('stylesheet_directory')); |
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 | |
| /** | |
| * | |
| * SEO report for different metrics | |
| * | |
| * @category SEO | |
| * @author Chema <chema@garridodiaz.com> | |
| * @copyright (c) 2009-2012 Open Classifieds Team | |
| * @license GPL v3 | |
| * Based on seo report script http://www.phpeasycode.com && PHP class SEOstats |