Custom recipe to get macOS running from scratch, setup applications and (WordPress) developer environment. I use this gist to keep the steps required to have a functioning system after a semi-annual fresh install.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install 10up/mu-migration | |
wp package install 10up/mu-migration | |
# Command to export | |
wp mu-migration export all subsite.zip --blog_id=1 | |
# Command to import | |
wp mu-migration import all subsite.zip --new_url=3316b88deb.nxcli.net/dk-0037 --mysql-single-transaction | |
# Additional steps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp plugin list --status=active --format=csv --field=name > plugins.txt | |
chomd +x enable_plugins.sh | |
./enable_plugins.sh plugins.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE | |
FROM wp_woocommerce_order_itemmeta | |
WHERE order_item_id IN ( | |
SELECT order_item_id | |
FROM wp_woocommerce_order_items | |
WHERE order_id IN ( | |
SELECT ID | |
FROM wp_posts | |
WHERE post_date < '2017-01-01' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://wpackagist.org" | |
} | |
], | |
"require": { | |
"wpackagist-plugin/wordpress-seo":"*" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp plugin install stop-xmlrpc-attack --activate | |
wp plugin install http-security --activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying single posts and pages. | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package WordPress | |
* @subpackage Twenty_Twenty | |
* @since Twenty Twenty 1.0 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a { | |
text-decoration: underline overline dotted red; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create db user | |
CREATE USER 'idealbiz_za'@'localhost' IDENTIFIED BY '<PASSWORD>'; | |
GRANT ALL PRIVILEGES ON idealbiz_za.* TO 'idealbiz_za'@'localhost' WITH GRANT OPTION; | |
flush privileges; | |
#mysql db import | |
mysql -u idealbiz_za -p'<PASSWORD>' idealbiz_za < idealbiz_fr_dump.sql | |
# to allow login and recover pass by the tech user | |
update wp_users set user_login="<EMAIL>" where user_login="<EMAIL>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Welcome to Custom CSS! | |
CSS (Cascading Style Sheets) is a kind of code that tells the browser how | |
to render a web page. You may delete these comments and get started with | |
your customizations. | |
By default, your stylesheet will be loaded after the theme stylesheets, | |
which means that your rules can take precedence and override the theme CSS | |
rules. Just write here what you want to change, you don't need to copy all |
NewerOlder