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 🙂

Can Anyone provide an example of RAW SQL for SELECTING posts by 2 or more tags

You seem to be catching wrong query. Dumping SQL for such URL (via posts_request filter) get me this: SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (93) AND tt1.term_taxonomy_id IN (94) AND wp_posts.ID IN ( SELECT … Read more

How to export 2 week’s worth of posts

The native import/export tool can do most of this, though I don’t think it will grab all the author profile information (not sure on that – I know it doesn’t bring over passwords, but it might bring the rest). In the WP admin panel go to Tools > Export and walk through the various option … Read more

post id not displaying

You call your header.php file by calling get_header() function in single.php file. It means that your $postid_profile variable exists only in scope of get_header() function. To make it visible in global scope you need to make your variable global. So your code should be modified like this: ### get the author info global $current_user, $postid_profile; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)