How can I make a copy of a local website on Windows in order to retrieve data from my WordPress site with the same theme hosted on my host?

mahdi.49

New member
Aug 14, 2022
18
1
3
I have a wordpress website where articles are published on a daily basis, and I'd like to quickly send this data to my site, which is hosted on my Windows with xammp local setup.

Is there a plugin that can accomplish this to solve this issue?

Crocoblock jet engine plugins do they work?
 

DatDudeUpStairs

Be the change that you wish to see in the world.
Trusted Uploader
Jun 30, 2019
1,334
786
113
Asgardia
It can be achieved but not by the way you are imagining it, unfortunately, I don't have the technical expertise for it.
Your local computer must have an active internet connection and you need to implant a rule for your local WordPress directory (xampp) to have access to the internet and place a bridge between your two versions of WordPress.
If I'm not mistaken I have seen one such example on youtube or StackOverflow.
 
  • Like
Reactions: mahdi.49

FTD Team

Active member
Null Master
Trusted Uploader
Banned User
Dec 20, 2020
57
101
33
Use database replication. From your main website to your local instance. This way you have your articles instantly on your local server.
If you have dynamic IP at your home you might want to use a DDNS service.
I can suggest you this Ludicrousdb for replication.
 

mahdi.49

New member
Aug 14, 2022
18
1
3
Yes, I agree, but not in the way you suggest.
but I'd like When I run xampp, it retrieves all data from my hosted website that was previously published.
It can be achieved but not by the way you are imagining it, unfortunately, I don't have the technical expertise for it.
Your local computer must have an active internet connection and you need to implant a rule for your local WordPress directory (xampp) to have access to the internet and place a bridge between your two versions of WordPress.
If I'm not mistaken I have seen one such example on youtube or StackOverflow.
 

Energy

Active member
Dec 19, 2019
198
90
28
Last edited:

mahdi.49

New member
Aug 14, 2022
18
1
3
Use database replication. From your main website to your local instance. This way you have your articles instantly on your local server.
If you have dynamic IP at your home you might want to use a DDNS service.
I can suggest you this Ludicrousdb for replication.
How can it be used effectively?

Is it necessary to upload the plugin on both websites?

I'm reading documentation, but it's a little difficult.
 

alexmisaila

Legend member
Trusted Uploader
May 9, 2020
1,140
922
133
⭐⭐⭐⭐⭐
I have a wordpress website where articles are published on a daily basis, and I'd like to quickly send this data to my site, which is hosted on my Windows with xammp local setup.

Is there a plugin that can accomplish this to solve this issue?

Crocoblock jet engine plugins do they work?
A way to quickly send data from your live WordPress site to your local setup without using plugins is to manually export the live site's database and import it into your local setup.

Here's an overview of the process:
  1. On your live site, go to phpMyAdmin and export the database by clicking on the "Export" button.
  2. On your local site, go to phpMyAdmin and create a new database.
  3. Import the live site's database into your local database by clicking on the "Import" button and choosing the exported file from step 1.
  4. Replace the live site's URL with your local site's URL in the wp_options table.
  5. Change the wp-config.php file on your local setup with the correct database information
  6. Visit your local site to confirm that the data has been imported correctly.
YOU CAN DO THIS AUTOMATICALLY USING THIS PYTHON SCRIPT:
Python:
import os

# Export live site's database
os.system("mysqldump -u {user} -p{password} {database} > live_site_db.sql")

# Import exported database into local setup
os.system("mysql -u {user} -p{password} {database} < live_site_db.sql")

# Replace live site's URL with local site's URL
os.system("sed -i 's/{live_site_url}/{local_site_url}/g' {database}")

# Update wp-config.php file with correct database information
from wpconfig import WPConfig
config = WPConfig(path='path/to/wp-config.php')
config.set_db_name('{database}')
config.set_db_user('{user}')
config.set_db_password('{password}')
config.save()

you need to have the command line interface mysqldump, mysql, sed and python libraries os, wpconfig installed on your machine before running the script.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu