Support » Plugins » how to recreate db’s “nice names” for imported content?

  • hi all,

    I’m using phpMyAdmin to pull across content from phpBB into WP, but I’m running into problems when it comes to the fields such as post_name, user_nicename, etc. where regex / sanitised versions of the data are stored. I’m bluffing my way with most of this, so am not sure what to do here. Is there any way that I can filter the text within MySQL?


Viewing 5 replies - 1 through 5 (of 5 total)
  • If there is, it would probably take a SQL developer with years of experience to figure out how to do it. And she might only chuckle at the request.

    If it’s possible, I think your best option is to pull the data in, then have a PHP script that’s plugged into WordPress’ functionality perform the filtering of a post title and update the post_name with it.

    hmm, I was afraid that might be the case.

    I guess my next question is: could anyone suggest the necessary PHP code to do it?

    Look over the sanitize_title_with_dashes() function located in wp-includes/functions-formatting.php.

    junap, if you run upgrade.php it will populate a lot of that data. At least that’s what I’ve heard 😉

    MattRead, you rock! It did indeed do the trick, many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to recreate db’s “nice names” for imported content?’ is closed to new replies.