WordPress.org

Ready to get started?Download WordPress

Forums

localhost xml file cat# no same on remote WP database (6 posts)

  1. Tony Pratt
    Member
    Posted 1 year ago #

    I am developing a php site with an attached WordPress blog using Dreamweaver CS6 on my localhost test server. My php pages contain echos from private blog posts with an average of several divs per page.

    Heres my problem, when I export the xml from my localhost and import the xml into my remote hosted WordPress blog the categories I assigned locally do not have the same category #assignment.
    Example:
    blog/?cat=10
    for a catagory on my local blog changes assignment to lets say
    blog/?cat=9
    on my hosted remote site blog.

    Of course this totally messes up the echoed content going to the respective divs on the php main site pages.

    How can I either get the xml to maintain the cat=# or else edit the category number assignment on the remote site?

    The reason I want to develop locally is to be able to demo the site in different locals which do not have internet access. In other words I would like my localhost test server site mirror the actucal site on the web.

    Any suggestions would be greatly appreciated.

  2. s_ha_dum
    Member
    Posted 1 year ago #

    How are you exporting? PhpMyAdmin? mysqldump? A plugin? How are you importing?

  3. Tony Pratt
    Member
    Posted 1 year ago #

    I am using the WordPress export tool to generate the xml and the WordPress import tool to import.

    I am thinking of doing a sql dump and edit the database name within the file to match my remote database. Think that will work.

    I am a little concerned that my MAMP server version is 5.1.44 while the remote server is at version 5.5.24. Do you see any issue here?

  4. s_ha_dum
    Member
    Posted 1 year ago #

    I very much doubt your live server is running MAMP. Are you talking about your MySQL server version? If you are talking about MySQL, I doubt the version difference will matter.

    I was fairly sure that export/import tool preserved all of the IDs. It really just wouldn't work otherwise. Have you tried posting in that plugin's forum?

  5. Tony Pratt
    Member
    Posted 1 year ago #

    Originally I was hoping to use the WordPress tool export from my locahost WordPress to generate the xml and then use the WordPress import tool into my remote WordPress. For some reason that did not work correctly, as I mentioned above the WP post echoes went to the wrong div assignments on my PHP site pages.
    To investigate I went to phpMyAdmin for both servers and discovered that the term_IDs were different between the two databases.
    I eventually solved the dilemma by doing a sql dump from my localhost install and after opening the dump file and changing its internal database name to my remote WP database name along with the blog urls from localhost to my online domain I imported the dump into my remote install. That did the trick everything is working fine. It remains unexplained as to why the WP xml file did not come into the remote database correctly with the proper term_IDs. I opened the xml file with a text editor and the term_IDs were correct before the import so it was not a problem with the actual export from my localhost WP.

  6. s_ha_dum
    Member
    Posted 1 year ago #

    Originally I was hoping to use the WordPress tool export from my locahost WordPress to generate the xml and then use the WordPress import tool into my remote WordPress.

    I've done that numerous times without a problem. I am puzzled why you had trouble.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.