WordPress.org

Ready to get started?Download WordPress

Forums

changed domain name - need help finding .sql file to change (11 posts)

  1. kehills
    Member
    Posted 9 years ago #

    Hi there,
    According to the codex (http://codex.wordpress.org/Moving_to_a_New_Server), and if I'm understanding it properly, I need to change some files in the database file. (Although my server stayed the same, the domain name changed.) It says:

    If you are moving to a new domain, the database file may have references to your previous domain name in it which need to be changed. These include website references, emails, and links to images within your site. They will need replacing with the new domain name. A simple process of changing this information is as follows:

    1. Using Notepad or another plain text editor, open a copy of the .sql database file. Using a word processor or an HTML editor could cause errors. Your best bet is to stick with a generic plain text editor.
    2. Using the search and replace function in the text editor, find all instances of the blog's old URL and replace it with the new URL.
    3. Repeat the process with your old email address. (For example, replacing someone@example.com with someone@tutorial.com)
    4. Save your changes.

    I understand all of this. What I don't understand is where I should find the .sql database file that needs editing with a text editor. I realize this is probably a very "duh" question, but I've banged my head on the wall enough and am conceding defeat. Help?

    -Kelly

  2. orangeguru
    Member
    Posted 9 years ago #

    You need to save a mySQL database dump first - use phpMyAdmin for this:

    http://codex.wordpress.org/phpMyAdmin

    Most providers install a version of phpMyAdmin on their user domains.

    Another way is to use WP-Backup:

    http://weblogtoolscollection.com/archives/2005/06/27/wordpress-backup-plugin-localized/

    But I am actually not sure in which format it saves the dB. Never used it myself.

  3. orangeguru
    Member
    Posted 9 years ago #

  4. kehills
    Member
    Posted 9 years ago #

    Hmm. Okay, that helped a little bit - I just used basic mysqldump commands to generate the database. Of course, after making the changes and trying to use the changed database, I'm getting "Error 1050 at line 11: Table 'Academiacategories' already exists."

    Hrm.
    -K

  5. moshu
    Member
    Posted 9 years ago #

    If you saved/exported both the structure and data then you'll have to delete the tables and import the changed .sql file. (But always have a backup before such drastic actions :)

  6. kehills
    Member
    Posted 9 years ago #

    Well that sounds properly terrifying. Sigh - why can't things be easy?
    :)
    -K

  7. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Does this help ?
    http://www.tamba2.org.uk/wordpress/restore/

    That guide is not yet as complete as I want it to be, but it's okay to go.

  8. kehills
    Member
    Posted 9 years ago #

    It looks lovely, but I'm not using phpMyAdmin; I'm just futzing around in the command line of my server (having ssh'd in); as far as I can tell, they don't have phpMyAdmin installed, so I'm doing things the "hard" way (ie I got the database dump by typing mysqldump -ppassword DatabaseName > db.sql then downloaded db.sql to my machine, made the necessary domain name changes, and uploaded it back to the server).

    -K

  9. TechGnome
    Moderator
    Posted 9 years ago #

    Did your database also move to a new server? OR are you simlpy moving from one directory to another?

    Tg

  10. TechGnome
    Moderator
    Posted 9 years ago #

    Never mind... I see that what you are doing is changin the domain name..... that's a different situation all together....

    Tg
    -i'm not really here. this is just a figment of your imagination-

  11. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Hi TG !

Topic Closed

This topic has been closed to new replies.

About this Topic