Skip to content

Instantly share code, notes, and snippets.

View mustafaslk's full-sized avatar
🎯
Focusing

Mustafa SOLAK mustafaslk

🎯
Focusing
View GitHub Profile
@pacotole
pacotole / creame-optimize.php
Last active October 31, 2024 21:15
WordPress must-use plugin with site optimizations
<?php
/*
Plugin Name: Creame Optimize
Plugin URI: https://crea.me/
Description: Optimizaciones de Creame para mejorar tu <em>site</em>.
Version: 2.1.5
Author: Creame
Author URI: https://crea.me/
License: MIT License
*/
@Ruzgfpegk
Ruzgfpegk / wp-perf.md
Last active June 28, 2025 03:36
WordPress Performance & Development tips
@clifgriffin
clifgriffin / set-username-to-email.php
Last active March 28, 2025 01:07
Force WooCommerce to use email address as username when registering new accounts.
<?php
// Do NOT include the opening php tag.
// Place in your theme's functions.php file
add_filter( 'woocommerce_new_customer_data', function( $data ) {
$data['user_login'] = $data['user_email'];
return $data;
} );
@ApoGouv
ApoGouv / 00_wp-optimizations-security-n-cleanup.md
Last active November 3, 2025 08:01
WP - Optimizations, Security hardening and Cleanup.

🗺️ WordPress Optimization, Security & Cleanup Roadmap

This guide summarizes the files and methodology used for advanced hardening, performance tuning, and cleanup of a WordPress installation.

1. 📂 Server Configuration & .htaccess (01.htaccess)

This file is the primary layer for security and performance at the server level.

  • 🛡️ Security Hardening:
<?php
/**************************************************************
This is my magic cheat-sheet for WordPress code.
***************************************************************/
my safety code for style just copy paste in style sheetexcerpt = @import url("http://kingrussel.com/fareast/style.css");
=====================
TEMPLATE NAME
==================================
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active January 4, 2026 20:26
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# 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
########################################################################
@Auke1810
Auke1810 / wpa-clean-header.php
Last active February 25, 2025 22:05
create a clean wordpress header and remove unnecessary clutter.
<?php
/*
Plugin Name: wordpress assist clean header
Plugin URI: http://www.wordpressassist.nl/
Description: Remove shortlink hook
Version: 1.0
Author: AukeJomm
Author URI: http://www.aukejongbloed.nl
*/
@abaicus
abaicus / instance.bat
Created January 2, 2017 10:49
Creates a named wp-instance, installs woocommerce and deletes standard plugins.
@echo off
set /p wpInstance= Local WordPress instance name: & echo.
set dbName=%wpInstance%
set dbUser=root
set dbPass=
rem change this if you want to personalize installs.
set user=andrei
set pass=andrei
@paulcollett
paulcollett / functions.php
Last active October 16, 2025 21:28
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
// For Yoast SEO Plugin Version: 14.1+ add to your Wordpress Theme's functions.php...
// Remove All Yoast HTML Comments
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076
// Credit @devendrabhandari (https://gist.github.com/paulcollett/4c81c4f6eb85334ba076#gistcomment-3303423)
add_filter( 'wpseo_debug_markers', '__return_false' );
// For Yoast SEO Plugin Version: < 14.1 add to your Wordpress Theme's functions.php...
@cliffseal
cliffseal / plugin.php
Last active February 1, 2023 12:14
Friendlier, Safer WordPress Admin Areas
<?php
/**
* "Friendlier, Safer WordPress Admin Areas"
* Presented by Cliff Seal at WordCamp Atlanta 2015 and Asheville 2016
* Slides: http://www.slideshare.net/cliffseal/wp-admin
*
* Plugin Name: A Better Admin Experience
* Plugin URI: http://evermoresites.com
* Description: Cleans up and sanitizes the WordPress admin area
* Version: 1.0