How can I safely port my Wordpress blog to localhost?

I am trying to make local development copies for my Wordpress blog. First I tried to install wordpress locally (in XAMPP for Windows), install plugins, and then import the data in real time (from the backup database). The problem is that when I import real-time data, I start to get all kinds of errors, even after I changed the blog URL through the database.

Also, the redirection rules that I have on my server do not seem to work locally (regardless of whether they are installed by Wordpress or some of its plugins).

So, is there a safe way to just capture all this and make it work locally exactly the same as the server?

Your help is much appreciated :)

+3
source share
6 answers
  • Get a full backup of all files in your online Wordpress installation
  • get a full backup of your database
  • with any text editing software, process the SQL file of the backup database and change each occurrence http://old.siteusinghttp://localhost
  • extract the files to the root of your document.
  • edit wp-config.phpto configure host / database user / pass
  • import modified SQL backup
  • go to the admin panel, go to Options-> Permalink and save to update permalinks

, , . , , .htaccess

+7

, - , HOWTO, :

  • , , , Windows .htaccess - .. , ( ) AccessFileName Apache htaccess.txt, Windows. , .htaccess.

  • ( ) Wordpress Wordpress, . Wordpress ( ..), - . , .

, ?

+1

2cents:

, api- (, Google, ), IP-, Wordpress, (127.0.0.1). , , IP-. . Google Maps - , Recaptcha - , .

, , , .

0

kemp - . , - VirtualBox VMware Linux, - . WAMP-LAMP.

0
source

Kemp's answer is good, but you do not need to edit the SQL dump or modify the database.

Instead, add 2 lines to your wp-config.php file (I usually add them just above the comment line in the file:

define('WP_HOME','http://localhost');
define('WP_SITEURL','http://localhost');


/* That all, stop editing! Happy blogging. */ <-- this line already present in the file.
0
source

Source: https://habr.com/ru/post/1727368/


All Articles