How can I safely port my wordpress blog to localhost?
apache, permalinks, php, wordpress
Solution
- get a full backup of all the files in your online wordpress installation
- get a complete backup of the database in use
- with any text editing software, process the SQL file of the database backup and change every occurrence of `http://old.site` with `http://localhost`
- extract the files to your document root
- edit `wp-config.php` to tweak database host/user/pass
- import the modified SQL backup
- login into admin panel, go to Options->Permalink and save to update permalinks
No need to install anything, just grab what you have online. On windows you might have to rename `.htaccess`
Problem
I'm trying to make local development copies for my wordpress blog. I tried first to install wordpress locally (on XAMPP for Windows), install the plugins then import the live data (from a DB backup). The problem is whenever I import the live data I start getting all sorts of errors, even after I change the blog's URL through the database. Also, the redirection rules I have on my server don't seem to work locally (whether set by wordpress or some of its plugins). So is there a safe way to just grab the whole thing and make it work locally exactly like the server? Your help is much appreciated :)