WordPress and Git – What folders should I track?

Basically ignore everything except your theme folder and custom plugins. sample .gitignore: wp-admin/ wp-includes/ .htaccess index.php license.txt liesmich.html readme.html wp-activate.php wp-blog-header.php wp-comments-post.php wp-config.php wp-config-sample.php wp-config-stage.php wp-config-live.php wp-config-dev.php wp-config-production.php wp-cron.php wp-links-opml.php wp-load.php wp-login.php wp-mail.php wp-settings.php wp-signup.php wp-trackback.php xmlrpc.php config/ wp-content/plugins/ wp-content/mu-plugins/ wp-content/languages/ wp-content/uploads/ wp-content/upgrade/ wp-content/themes/* # don’t ignore the theme you’re using !wp-content/themes/yourthemename This makes the … Read more

How to delete post revisions?

This is a much safer query to use and will remove related entries from the postmeta and term_relationship, unlike deathlocks query in his answer. Change the {id} to the id of each blog posts table. You can combine this query to run all the post tables at once, but try this on one table first. … Read more

Gutenberg editor add a custom category as wrapper for custom blocks

Digging myself deeper in documentation, I got the following result. There is a way to group your custom blocks around a given category in Gutenberg, and therefore we have the method block_categories_all. So with a filter, you can extend the default categories with custom ones. Here is my example: add_filter( ‘block_categories_all’, function( $categories, $post ) … Read more