1

So for backing up any/all my wordpress sites i use a tool called "BACKUP BUDDY" and its a great tool and all but lately its been really buggy and today finally it went kaboom!

Usually my workflow is that i develop the site on my local machine using WAMP/MAMP. when done and ready for testing, i use the tool to backup/transfer to real server etc.

Since my tool stopped working(uploads half the content) i decided to just do it manually by installing Wordpress first on the real webserver(done), Applying my theme(done),

then exporting the database sql from the local server(done), and thereafter importing it to the real server(done) and the 2xs that ive done it the site comes up blank.(outcome equals fail)

im assuming that something has to be changed/done in order for it to work but not sure what.

Any ideas as to what im doing wrong? because as of now, if i cant do it like this, id have to manually create ALL the pages etc and its not alot but would like to know the proper method in how to do this.

Thanks in advanced.

1
  • What is your experience with command line? Commented Aug 22, 2012 at 15:53

2 Answers 2

3

I find the export tools very slow and not so reliable. If imporitng fails you probably have a timeout with your server or your dump file is too big.

Here's the way I do it, and it's much faster:

  1. extract a fresh copy of wordpress code in production
  2. replace the wp-content folder with the one from dev
  3. copy the wp-config.php from dev and verify the database connection settings
  4. do a full mysql dump of your development wordpress database
  5. import the dump into your production database
  6. if the domain used in dev is different from production run the following queries in production.

    UPDATE wp_options SET option_value = replace(option_value, 'olddomain.com', 'newdomain.com') WHERE option_value like '%olddomain.com%';

    UPDATE wp_posts SET guid = replace(guid, 'olddomain.com','newdomain.com'), post_content = replace(post_content, 'olddomain.com','newdomain.com');

1
  • This is generally the best way. The MySQL export/import is ok, but you want get settings, you will have to do some setup on the menus (if needed), and it isn't guaranteed that the posts, comments, users, etc will have the same id. Best to use a dump like this. You can use phpmyadmin on most hosts.
    – Jake
    Commented Aug 23, 2012 at 1:12

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.