Skip to content

Instantly share code, notes, and snippets.

@kankadev
kankadev / create_admin_acc.php
Created August 4, 2022 13:18
[create admin account in WordPress db] upload this file into /wp-content/mu-plugins #WordPress #WP #database
<?php
// creates an admin account in the WP database
add_action( 'init', function () {
$username = 'admin';
$password = 'password';
$email_address = '[email protected]';
if ( ! username_exists( $username ) ) {
@kankadev
kankadev / gruntfile.js
Created March 22, 2022 14:38
mysqlbackup, SCSS compile, minify etc.
module.exports = function (grunt) {
grunt.initConfig({
theme_path: 'WordPress/wp-content/themes/bad-teammates',
pkg: grunt.file.readJSON('package.json'),
sass: {
dev: {
options: {
},
@kankadev
kankadev / .htaccess
Last active March 19, 2022 14:05
[Redirect Laragon vHost to subfolder] Redirect a Laragon vHost / local domain to subfolder #WordPress #Web
# redirect example.local to subfolder WordPress/
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.local$
RewriteCond %{REQUEST_URI} !^/WordPress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /WordPress/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.local$