Skip to content

Instantly share code, notes, and snippets.

View ValeriiVasyliev's full-sized avatar
🏄
Focusing

Valerii Vasyliev ValeriiVasyliev

🏄
Focusing
View GitHub Profile
@ValeriiVasyliev
ValeriiVasyliev / wp-cli-fully-updating-in-one-command.md
Last active January 23, 2024 08:42
WP-CLI: Fully updating a website with one command
wp core update && wp plugin update --all && wp theme update --all && wp core language update
@ValeriiVasyliev
ValeriiVasyliev / woocommerce-delete-all-orders-by-mysql.md
Created February 7, 2022 15:21
Woocommerce : delete all orders by mysql
DELETE FROM wp_woocommerce_order_itemmeta;
DELETE FROM wp_woocommerce_order_items;
DELETE FROM wp_comments WHERE comment_type = 'order_note';
DELETE FROM wp_postmeta WHERE post_id IN ( SELECT ID FROM wp_posts WHERE post_type = 'shop_order' );
DELETE FROM wp_posts WHERE post_type = 'shop_order';
@ValeriiVasyliev
ValeriiVasyliev / wordpress-bulk-delete-all-images.md
Created February 1, 2022 09:26
WordPress : bulk deleter all images
DELETE FROM `wp_posts` WHERE `post_type` = "attachment";

DELETE FROM `wp_postmeta` WHERE `meta_key` = "_wp_attached_file";

DELETE FROM `wp_postmeta` WHERE `meta_key` = "_wp_attachment_metadata";

DELETE FROM `wp_postmeta` WHERE `meta_key` = "_thumbnail_id";

UPDATE `wp_postmeta` SET `meta_value` = NULL WHERE `meta_key` = "_product_image_gallery";
@ValeriiVasyliev
ValeriiVasyliev / wordpress-change-domain-after-transfer.md
Created February 1, 2022 09:15
WordPress : change a domain after transfer
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');

UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com'); 

UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
@ValeriiVasyliev
ValeriiVasyliev / xampp_php7_xdebug.md
Created September 22, 2021 07:46 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@ValeriiVasyliev
ValeriiVasyliev / WordpressAsDependency.md
Created July 13, 2021 08:37 — forked from cullylarson/WordpressAsDependency.md
Installing Wordpress as a dependency

Wordpress as a Dependency

How to install Wordpress as a dependency in your project, without including the WP install in version control.

Rationale

In the spirit of The Twelve Factor App, we want to "explicitly declare and isolate dependencies". Wordpress doesn't really promote this idea out of the box, so we have jump through a few hoops to do it. This document describes a simple method to include Wordpress as a dependency in this way.

General Idea

@ValeriiVasyliev
ValeriiVasyliev / gitcmd.md
Last active October 22, 2021 10:01
GIT commands

GIT commands

Add one or more files to staging (index)

git add <filename>

git add *
@odan
odan / xampp_php7_xdebug.md
Last active July 25, 2024 23:01
Installing Xdebug for XAMPP
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 28, 2024 03:34
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites