Skip to content

Instantly share code, notes, and snippets.

View lsemenenko's full-sized avatar

Leo Semenenko lsemenenko

View GitHub Profile
@lsemenenko
lsemenenko / main.sh
Last active February 13, 2020 06:56
Remove linkojager.org injected js from WordPress posts
#!/bin/bash
wp search-replace '\<img style="width: 0; height: 0; display: none; visibility: hidden;" src="(https?:)?\/\/linkojager\.org\/.+\/\>' '' --regex
wp search-replace '\<script.+src="(https?:)?\/\/linkojager\.org\/.+\<\/script\>' '' --regex
@lsemenenko
lsemenenko / main.sh
Created January 29, 2020 05:59
WordPress: Merge existing single site into existing multisite installation
#!/usr/bin/env bash
#
# This is a rudimentary script to merge wordpress single site into existing multisite
#
site1_directory="" # path to single site installation. example: /sites/google.com/public
site2_directory="" # path to new multisite installation.
new_blog_id="" # the new blog id
cd ${site1_directory} && \
@lsemenenko
lsemenenko / 0x0944c497dA862e0Eb4e3CC57d397c131fc1D623A
Created October 23, 2017 21:24
0x0944c497dA862e0Eb4e3CC57d397c131fc1D623A
0x0944c497dA862e0Eb4e3CC57d397c131fc1D623A