How to bulk edit canonical url’s in SQL?

Down- and uploading CSVs is a tough one that forces you to make a bunch of steps manually which is prone to human error (and typos). My suggestion would be to do something that you can battletest locally in a local copy of your DB. Steps to follow: Make a database dump using the mysqldump … Read more

Importing MariaDB into Mysql in WordPress

While at the current point in time there is very little difference, and maybe no difference at all, this is a bad practice if your development environment supposed to replicate the server your code will run on. There is just no point in forking a product without having the intention to change it, and the … Read more

If I consider changing my WordPress DB tables to InnoDB, will it have an effect on the way WordPress works?

There’s quite a lot of information on here about switching to InnoDB https://wordpress.stackexchange.com/search?q=innodb There are a number of things to think about: InnoDB is helpful with you’re faced with contention – ie when you have tables that are being written to as well as being read InnoDB does not support FULLTEXT indexes so plugins that … Read more

How to do a MySQL dump from production site without using a search and replace script for local development?

What you posted will work fine for all links that are generated by WordPress: permalinks, script/style enqueues for local files, featured images, etc. I tend to define my Site URL and Home URL dynamically like this: <?php define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); define(‘WP_SITEURL’, WP_HOME . ‘/wp’); Note: HTTP_HOST isn’t always present, use with caution As far … Read more

MySQL LIKE not working

Try to replace: AND meta_value LIKE %s with AND meta_value LIKE ‘%%%s%%’ so your SQL will become: AND meta_value LIKE ‘%The%’ instead of: AND meta_value LIKE ‘The’

Search and replace in post content

Okay, this always seems to happen to me. I spend ages looking for an answer and finally decide to give up and post here and then one more search finds enough to solve it. Anyway, this is what worked for me: update wp_posts set post_content = replace(post_content, ‘[/tab] [tab title=”1024×576″] <table class=”screenshot-table”>’, ‘[tabby title=”1024 x … Read more