• I’m building my first WordPress site. I have XAMPP running on two local PC computers.

    I installed the latest XAMPP on my Win7 computer, and the final XAMPP that supports WinXP on my trusty XPpro Pentium4. Specifically, XAMPP 1.8.2 with PHP 5.4.31

    Both local installations have the latest WP (4.1.1) installed in identically named sub-directories:
    c:\xampp\htdocs\wp-123

    Both local WP installations connect to identically-named MySQL databases named: wp-123

    As I understand it, my local PHP version has to be relatively close to the PHP version employed by the online host – HostGator shared UNIX, running PHP 5.5x. I’ve been doing initial development on the old XP because it’s convenient for me. But I figure to migrate my actual, finished WP site from my newer Win7 computer to the root directory of the online hosting account – because those PHP versions should be a reliable match.

    QUESTION 1:
    Can I just copy the directory c:\xampp\htdocs\wp-123 from my WinXP computer to my Win7 computer?

    1. The WP directories on both machines are named identically.
    2. The MySQL databases on both machines are named identically.
    3. The WordPress installation on both machines is the latest, version 4.1.1
    4. XAMPP and PHP on the XPpro machine are older than XAMPP and PHP on the Win7 machine.

    QUESTION 2:
    If the answer to Question is affirmative (YES), I assume I’ll have to copy the MySQL database from the XP machine to the Win7 machine, too. Can you tell me where to find it, and whether I can simply drag-and-drop a copy from XP to Win7?

    Thanks,
    Tom

Viewing 7 replies - 1 through 7 (of 7 total)
  • A1) All yes. In truth the versions only need to be close enough.

    A2) You may be able to just copy the files that mySQL uses to provide the database services, but DON’T DO IT! The correct thing to do is to EXPORT the data in the tables on the XP machine, and do an IMPORT on the new system. Use phpmyadmin on both machines to do this. You must create the database and database user plus password yourself.

    Can I just copy the directory c:\xampp\htdocs\wp-123 from my WinXP computer to my Win7 computer?

    Yes. And you can do the same when you upload it to your server.

    I assume I’ll have to copy the MySQL database from the XP machine to the Win7 machine, too.

    You will export your WordPress’ database SQL file using phpMyAdmin. XAMPP using phpMyAdmin and if you look on the main XAMPP page when you go to https://localhost you should see phpMyAdmin listed on the left side under the tools section. Export the SQL for your entire database (it will be a plain text file) then when you get that file over to your new computer, reimport it into MySQL also using phpMyAdmin.

    Thread Starter BothHands

    (@bothhands)

    Thanks VERY MUCH, RossMitchell.
    I appreciate your answers, and especially appreciate you warning not to do the wrong thing (ie. simply copying the MySQL data base from the XP machine to the Win7 machine). Being new at this, it’s easy to mess things up and never really know what went wrong.

    Thanks VERY MUCH, cheesedude.
    Because I’m inexperienced, Ross’ answer left me wondering about a thing or two, but then your follow-up answer went into detail and cleared things up exactly as needed.

    QUESTIONS 3a and 3b
    In phpMyAdmin:
    1. The database for my WP site appears in the left-hand sidebar list.
    2. I selected it and then selected the ‘Export’ tab at the top of the main/right-hand page area.
    3. A page is displayed entitled “Exporting tables from “wp-123″ database”

    Export Method: QUICK or CUSTOM <— Is “Quick” the correct option?

    Format: SQL is the default choice <— Is “SQL” the correct option?

    Thanks

    Quick may be the right option. If you select “Custom” it will display a box with all the tables in the database which should be selected by default. You want to make sure you export all your WordPress database tables.

    Output: save output to a file. In SQL format. You can generally leave everything else the same. Do not use compression at first until you know what you are doing (if you have a small database, compression is not even an issue anyway).

    Then when you download your SQL export, if you want to, you can open it in Wordpad or Notepad or any other text editing program and take a quick look at it if you want to see it is plain text.

    Thread Starter BothHands

    (@bothhands)

    Thanks, cheesedude. I’ll dig into this later today.

    Can you tell me where my WordPress PAGES are located?

    I searched my WP directory and the xampp\mysql directory based on several page names, but found nothing. Perhaps reviewing the database in plain text will clarify this, but any clue you can provide now will be appreciated.

    Thanks again for your help.

    Your WordPress pages are in your database tables. Just about your entire website content is stored and managed in the database, this includes your pages, posts, menus, user details, plugin options, other options, comments and on and on. The only content which comes from the files are your images and media, as well as your theme and plugins.

    Thread Starter BothHands

    (@bothhands)

    AHA! Thanks, Ross.
    I just copied your remarks and will refer to them often as I progress in building my site.

    I’ve been thrashing about online for about three weeks (in my spare time), trying to educate myself about WordPress – a “crash course” with CRASH as the operative word, ha! Your remarks as posted above are three of the most information-packed sentences I’ve come across.

    You and cheesedude have already spared me many hours of confusion.

    Many thanks to you both!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Copy the WP directory and MySQL from XP to Win7 machine?’ is closed to new replies.