REGEXP_REPLACE in post_contet

Ok, if someone in the future also needs something like this, I found the solution after some time of playing with regular expressions. This worked for me: UPDATE `wp_posts` SET `post_content` = REGEXP_REPLACE(`post_content`, ‘https:\/\/www\.example\.com\/magazin\/(.*?)\/”>’, ‘https://www.example.com/magazin/\\1″>’); Example in action can be seen here: https://regex101.com/r/3ZPylJ/1 Hope it helps! Smile to all 🙂

get value from ‘terms’ table

get_terms does indeed fetch from the terms table, but it does also use a join on the taxonomy table, since you need to specify which taxonomies you want terms for in your get_terms query. If you want to get all terms, you could use something like: $all_terms = get_terms([ ‘taxonomy’ => get_taxonomies(), ‘hide_empty’ => false, … Read more