Hello guys I have a project where I need to import an old database to wp but I need a solution to keep the old id's as posts id so i can make the links look the same as the old website in this way we will avoid problems whit the links already indexed .

Any idea ?

  • 1
    What IDs are you referring to? Those of posts? Of users? Of other data? Do you need to merge entire databases or select table(s)? Apr 6, 2013 at 12:45
  • the id of posts , I need it because the id is in the url . Apr 6, 2013 at 15:44
  • I use a custom post url in the form of /%postname%+id-%post_id%.html Apr 6, 2013 at 15:52
  • Are you importing from another WordPress site using the in-built importer, or have you written custom code to import data from a non-WordPress site? Apr 6, 2013 at 19:53

1 Answer 1


The simplest way would be to export your old site's posts from phpmyadmin, manually edit the .sql file that you download and then upload the new file to your site's database from phpmyadmin again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.