Create a clone from one WordPress site to another in a few minutes

Caveat

This is extremely bad for SEO. Having duplicate content can ultimately cause your site(s) to be removed from search results.

Solution

This is actually pretty simple to have one database and disk content. Point both of the docroots to the same directory. Make sure each server name in your Apache config for each domain matches your domain name. Add this to your wp-config.php file:

define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']); # no trailing slash
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME']); # no trailing slash

Content URLs (images, media, etc…) will be sourced from the original domain, but will still work. Posting media on either domain will create a mix-match of URLs for guid and post_content. If you disable one domain, you would then need to find/replace all of those URLs in the database to keep them working properly. Do not hardcode JavaScript includes. Use wp_enqueue_script and wp_register_script so that you don’t run into XSS errors.

Again, this is not a good practice, but WordPress is flexible enough to accomplish what you want.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)