How to Copy Your Online WordPress Blog to XAMPP on Your Local Computer or USB Drive
No related posts.
This site is optimized for display on your iPhone
Posting tweet...
Backup WP
Bigdump
Blackboard
Change URL
Custom header
Database
Deactivate plugins
Edit theme
From WordPress Codex
iNove
Install
Kubrick
Large database
Localhost
Locked out of WP
Manage comments
Moodle
moodle 2.0
Moodle Partner
moodle security
moodle upgrade
Move
Multiple Blogs
Non-Techie
Optimize
Password
Patch vs Fix
Photoshop
phpMyAdmin
Plugin Review
Redirect WP
Released Under GPL
Security
Upgrade
wordpress.org moderation
WordPress 2.8
WordPress 2.8 Users Guide
WordPress 2.9
WordPress 3.0
WordPress Post
wordpress upgrade
WordPress User's Guide
WP Plugins
WP Themes
XAMPP Backup WP (1)
From WordPress Codex — GPL (16)
Image Editing (4)
Install WP (3)
Just the Video Tutorials (32)
Locked out of WP (5)
Moodle (15)
Move WP (4)
MS Office (2)
Non-Techie (5)
Training (1)
Uncategorized (4)
Upgrade WP (11)
WordPress Termonology (1)
WordPress Users Guides (3)
WP 2.9 (6)
WP 3.0 (3)
WP Comments (2)
WP database (5)
WP General (4)
WP Plugins (4)
WP Templates (3)
WP Themes (13)
XAMPP (2)
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Super. Hvala za upute.
Thank you so much for this great educational video. I’ve always wondered on how would I do that, and you explained it in a very simple way.
Thank you
I followed your entire process just that I did it in different domain on my host.
When I completed the import, it comes up with a new WP install dialog and does not show the copy of my main blog.
When I was modifying the database export file, I saw instances of http://www.askthecomputerdoc.com without the /blog where my main blog resides. I copied my blog to a domain, maverickmoneymakerswinner.com without /blog.
In any case, it’s not working.
What do you suggest?
I changed the instances of http://www.askthecomputerdoc.com/blog to http://www.maverickmoneymakerswinner.com.
I did not change http://www.askthecomputerdoc.com at all.Could this be the problem?
@David: Looks to me like you have two installs on your live site…one in root and one in /blog. Are you sure you copied the correct one?
Thank you! I followed your instructions and I’m almost there. Two things are different in my case:
1. I’m copying a WordPress MU installation to my local site. I think I have a handle on the MU-specific issues.
2. My live site lives at the root directory. I’m moving it to a subdirectory off my xampp/htdocs directory. I think this is where my issues may lie…
I can get to the wp-admin login page (although my theme is obviously not working at this point…). I’m able to input username and password and click the Login button. But at that point it wants to take me to the wp-login page at the root level, so I get an Error 404 page not found.
Is there something I can tweak in the database SQL file to specify that the local site lives in a subdirectory?
Thanks!
Rich
@rptrevor: I haven’t been following the wpmu forums recently, but when last I was following those discussions (about a year ago), two things were a no-no in wpmu:
1. Installing in a subdirectory, and
2. Installing on localhost
Seems you are trying to do both of them. You may need to post to the wpmu forums and see if things have changed in the past year.
@figaro
Thanks! Actually I’ve successfully done both (installed on localhost in a subdirectory). I’m new to MU but both of these things have documented how-to’s. It is the copying over of the “live” root-based installation to the localhost subdirectory that is problematic (using your wp-content + edited SQL instructions). I’ll post back when I figure it out…
Hi! First of all thanks for this great tutorial!
I used this tutorial once to move a copy of wordpress blog on my Mac to my remote server since I went ahead and set up a bunch of content locally and didn’t want to re-do all the work. Now I’m trying to make a local copy so I can run a plugin that keeps timing out on my remote server (Regenerate Thumbnails).
This second time around I’m going backwards (remote to local as the tutorial shows) and I’m having trouble.
I import my sql dump and it breaks everything. What it find strange is that my sql dump has no references to the remote site URL other than in the “wp_bas_refer” section. 6 total and I replaced those. Also, I kept getting errors on import until I deleted the following from the beginning part:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
Any ideas?
@Rafael: I think you may be missing something in your search…the url should be in there at least a couple of times in the options table and I’m pretty sure it will be there a lot in other places as well. Are you sure you are searching on the correct address? Don’t add http or www to your search…just search on your domain name like widgets.com or widgets.com/blog if it’s in a subdirectory. Deleting the comments from the sql file shouldn’t cause a problem.
Good, I’m glad deleting those comments doesn’t hurt anything. I am positive that I looked and those were the only references to the domain. Six total in the wp_bas_refer section. Should I try a re-export?
I have been investigating the fact that when I import the sql dump and I browse wp_options in phpMyAdmin (locally) and I found that the value for site url is “/blog/” and the value for site home is “/blog”.
I’ve changed those to “http://localhost:8888″ as well as “http://localhost:8888/blog” and that doesn’t fix my problem.
What I find interesting is that I can go back, drop my imported dump, replace my wp_contents folder with the original one, and I can get WordPress to show me the install screens again.
So something’s wrong with the dump/import I guess? I also noticed all the references to posts, pages, plugins, etc begin with “blog/”. Does that sound correct?
So close yet so far away.
I get a blank page when loading localhost:8888 or localhost:8888/blog or localhost:8888/blog/wp-login.php
However, if load localhost:8888/blog/wpadmin/install.php, I get a message from WordPress saying:
——————-
Already Installed
You appear to have already installed WordPress. To reinstall please clear your old database tables first.
——————
So WP is still installed. It’s just a database problem. Argh! On top of this I can still simply replace the clean wp-content folder, and import a clean sql dump that I created today from the local clean copy of WP, and everything goes back to normal. Just a fresh WP install.
There has to be one teeny tiny detail that I am overlooking.
Well, Some progress. While at the normal state of a fresh WP install, I exported the wp_options table and re-imported it after importing the sql dump.
This makes it so that I can see everything pretty much as I see it on the remote (online) server.
With one huge exception. All the image links are broken. Thumbnails show the broken image link question mark icon. Everywhere.
Also, all my plugins were inactive and some are giving me trouble when re-activating,
The main reason I want to do this is so I can run Regenerate Thumbnails and re-crop all the thumbnails from the top left.
How can I restore the links to the images?
I’ve made progress. I had to to a find/replace in the sql dump in order to remove “blog/”. That fixed the image links.
Then re-import the sql dump, drop wp_options, and re-import the clean wp_options.
A lot of the plugins are wonky and some won’t activate (one from Yahoo–probably because it’s on a local environment.)
I hat to get rid of wp-cache. If present at all, a line of code was appearing at the very top of the WP control panel and the blog pages and posts and everywhere on the local site.
And, Renenerate plugins ran only once and ti did the opposite of what I wanted.
I just saw the import feature. I think I’m going to go with a fresh install again and import the XML file that I can export from the remote site. That may be much more stable.
Does anyone know how to edit media.php so that it generates thumbnails from the top left or just the top?
Well, I accomplished what I wanted. I started with a fresh WP install and I imported all my posts and pages with the XML file exported remotely. Attachments downloaded during the process.
All image links in pages and posts had an extra “blog/” in the path and I fixed some. I installed some plugins manually.
But those weren’t my goal.
I did find the code to edit media.php so that thumbnails are generated from the top and left. And I ran Regenerate Thumbnails again and made sure that all my thumbnails were cropped correctly. They were.
Then I uploaded my “uploads” folder via ftp and replaced the old one (have a local copy just in case).
Everything turned out well I guess. My thumbnails look good.
I’m still going to follow up on how to easily copy my remote blog/site into my local machine or thumbdrive. I really like the idea of having it portable since I have my portfolio on there.
I did another sql dump after changing the “siteurl” and “home” in “wp_options” to have the value of “http://www.site.com/blog”. It didn’t break the remote site, but the sql dump still only has like 6 references to the full site URL still in the wp_bas_refer_section. Any ideas?
@Rafael: The wp_bas_refer_section — is that a table? If so, it’s not a standard WP table.
Yes, its a table. I can see it in phpMyAdmin remotely. It’s not available as part of the standard WP install like you said. It does show locally if I drop all the tables and import the sql dump.
@Rafael: If you want to post the sql dump somewhere and send me a message (use the contact form on this site) telling me where to download it, I’ll take a look…your url has got to be in there…at least in the options table.
OK =]. I can export a fresh dump and upload it somewhere you can grab. I’ll send you a message letting you know where to download it.
I mentioned above that it didn’t work but from your excellent video I got the idea of how to do it. I backed up the posts separately and loaded them separately and it’s working beautifully.
Thanks
First of all congrats to the creator of this very well explained video.
Hi David,
Any idea how that happened at the first place bcoz the same is happening to me also. I’m being directed to installation page at the end.
Thanks,
Anoop
Thankyou so much! I can’t even express how much I appreciate this video. I’ve been trying to get this working for far too long. Your guide is the only one which got me through. Thankyou! I’ll send you a donation to buy you a drink or two tomorrow! Thanks!!
great tutorials, Its seems that I ran into some problems tho. after following all the instructions step by step I get:
Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at C:\www\htdocs\wordpress\wp-content\plugins\calendar\calendar.php:5421) in C:\www\htdocs\wordpress\wp-content\plugins\formbuilder\captcha\CaptchaSecurityImages.php on line 51
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at C:\www\htdocs\wordpress\wp-content\plugins\calendar\calendar.php:5421) in C:\www\htdocs\wordpress\wp-content\plugins\formbuilder\captcha\CaptchaSecurityImages.php on line 51
Warning: Cannot modify header information – headers already sent by (output started at C:\www\htdocs\wordpress\wp-content\plugins\calendar\calendar.php:5421) in C:\www\htdocs\wordpress\wp-content\plugins\sidebar-login\sidebar-login.php on line 603
Please help.
@Anoop
I followed all the steps that were recommended which copied all the plugins and themes but didn’t get my posts.
I did a separate backup and restore of the posts after going in as a new installation and then everything was basically there.
I don’t know why it didn’t work without that.
@Allan: You may need to disable the formbuilder and sidebar-login plugins and see if you have better luck.
Thank you very much for this tutorial. I’ve been trying to figure out how to do this since two days and while I found a lot of information, this tutorial finally helped me to get my blog running on my computer. Now I can go nuts testing
@Dani: You’re welcome…glad it helped.
Thanks for this video! I got through all the steps and it was working fine..and then all of a sudden I get this message:
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
It was working fine. I went to the login page, logged in, scrolled down to the Settings Menu (everything still fine), then clicked on Permalinks (because my permalink structure was messed up) and I noticed that the Admin Panel had lost some of its style effects. I was like “That’s weird”, so then I opened up a seperate tab and tried to get to my site..and I got that message. Now I can’t get into anything! What did I do? How can I fix it?
Also, my CSS sheet is not working for the site (from what I could see before I got this error).
Anyways, thanks a bunch for this video! I hope you can help me out!
Thomas
@Thomas: Looks like your site is up now…hopefully you got it sorted.
My live site is fine (I didn’t mess with that server or anything). It’s my local server that is giving me issues. When I go to access my site via localhost, that’s the error message that I get. I can get to the xampp menu fine, but I can’t get to my actual blog.
Any suggestions on what may have happened?
Ok, it is the .htaccess file that is causing all the issues.
When I checked in the error log for Apache, it seems that the ReWrite Engine function is what is screwing everything up. I took all the stuff out of the .htaccess file and it worked fine, but as soon as I tried to get into the Permalink structure, WordPress tried a ReWrite again and everything shut down. How can I fix this?
I’m having the same issue as Thomas with the permalinks. The .htaccess file isn’t being read properly it seems. Any ideas?
@Thomas
This was a fantastic tutorial. I followed it to the letter, and everything went well until the very, very end. After I imported my SQL I went back to the localhost site, and now I get an error and redirected to a search page. Any suggestions?
@Heather: It sounds like you may not have changed the url properly when editing the sql dump. Watch that part of the video again and make sure you are changing the online url to what your localhost url is. For example, if your online url is…
http://www.sideofsneakers.com
and you installed wordpress in a directory in XAMPP called wordpress, then your XAMPP url would be:
http://localhost/xampp/wordpress
so you would need to do a search on http://www.sideofsneakers.com and replace it with with http://localhost/xampp/wordpress
Then I would do another search on just sideofsneakers.com and replace with localhost/xampp/wordpress
@Dave
I don’t use the .htaccess in XAMPP
Thanks for the great tutorial! Everything worked great for me, until I imported my blog’s sql file. The when I look for the blog at localhost, I’m getting a message that says “Apologies, but the page you requested could not be found. Perhaps searching will help.” I can then click on a link that takes me to my blog online.
I tried deactivating most of the plug-ins and then reimporting (after dropping the tables first), but this didn’t help.
@Tracy
Just a note: I was actually having this same problem when I tried to copy my blog online.
I’m hoping for some advice please – been trying to create a development copy of my remote site for a week without success and after numerous attempts.
Everything seems to be ok – all my wp content folder is there; including theme, plugins etc and the local folder and remote folder are the same size.
There are no database errors.
But none of the pages created on the remote site or the navigation for those pages is there!
I’m sure it will be something simple – but it’s proved to be too challenging for me – can anyone help please?
Regards,
Harry