Transfer from host to local host with all messages and

I am working on a WordPress site, I changed the theme, but that is well said, I need the site to work live all day with one of the themes (because of the information); I want to change the settings of a new theme locally and after that change the theme to work well and I need site information and posts and .... I tried and searched more about this but I could not find anything useful

how can I move the site to localhost with all posts to change the subject? is it possible or not? or how can i work with a theme but i have another theme on my site?

+3


source to share


1 answer


Yes you can do it easily

If , you have full access to your site and host (FTP, phpmyadmin, etc.).

Fisrt:

Get a backup of your database (s) from cpanel and then your whole wordpress site with ftp.

Secondly:

In yourdb.sql file rename the links: Find only yoursite.com/

and replace withlocalhost/foldername/



Note. ... Don't click on the Add All button, but it doesn't have to.

Third:

Third and final import of your db to localhost/phpmyadmin

(create DB first, then upload to it) and then change your mysql credentials to wp-config.php

For example:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'Your DB Name');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', '');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

      

then create a folder in xampp/htdocs/

and paste the whole Wordpress site backup

Hope this helps you.

+2


source







All Articles