Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Lovor01

🏠
Working from home
View GitHub Profile
View WP CLI migration
wp search-replace 'http://example.com' 'http://example.test' --export=piranesi.sql --skip-columns=guid --skip-tables=wp_users
View Copy visual composer templates from one database to another
UPDATE `topomati_cp1`.`cp_options` SET `option_value` =
(SELECT `option_value` FROM `topomati_cp_hr`.`cp_options` WHERE `option_name` = 'wpb_js_templates')
WHERE `option_name` = 'wpb_js_templates';
View Batch convert images with imagick
magick mogrify -format jpg -quality 95 -path "C:\Users\Lovro\Documents\Posao\Link2\Piranesi\Optimizirane slike" *.tif
View Create new user for Apache basic auth
#Apache create basic auth passw file
.\htpasswd -bcB -C13 ..\conf\auth.users username password
#verify user
.\htpasswd -v ..\conf\auth.users username password
@Lovor01
Lovor01 / core-blocks.txt
Created Jan 16, 2021 — forked from DavidPeralvarez/core-blocks.txt
Gutenberg core blocks list
View core-blocks.txt
//A list of all blocks: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks
// Útil para filtros de Gutenberg como "allowed_block_types"
archives
audio
button
categories
code
column
columns
View Create openSSL certificate
.\openssl req -config ..\conf\openssl.cnf -new -out lovro.csr -keyout lovro.pem
.\openssl rsa -in lovro.pem -out lovro.key
.\openssl x509 -in lovro.csr -out lovro.cert -req -signkey lovro.key -days 1825
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
View Replace wordpress database
wp search-replace 'http://example.test' 'http://example.com' --skip-columns=guid --dry-run
--dry-run //for dry run
--export=database.sql // for export database
@Lovor01
Lovor01 / create pot
Created Jan 8, 2021
Create pot files using wp-cli
View create pot
wp i18n make-pot . languages/gmk.pot