• Hello,

    I am new to WordPress

    I am trying to duplicate a live wordpress site to my windows 10 pc.

    I use Wamp.

    I exported and imported the database.

    I can browse the tables in the database.

    I copied all the files from public_html into: c:\wamp64\www\mysite.local

    I changed the database details in wp_config to:

    <

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

    /** MySQL database password */
    define(‘DB_PASSWORD’, ”);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    I added this in C:\Windows\System32\drivers\etc\hosts:

    127.0.0.1 mysite.local
    ::1 mysite.local

    I added this in C:\wamp64\bin\apache\apache2.4.51\conf\extra\httpd-vhosts.conf:

    <VirtualHost *:80>
    ServerName mysite.local
    DocumentRoot “c:/wamp64/www/mysite.local”
    <Directory “c:/wamp64/www/mysite.local”>
    Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All
    Require local
    </Directory>
    </VirtualHost>

    When I browse localhost I see the folder under: VirtualHost.

    Clicking on mysite.local it opens a save file window with random letters as the file name, every time different letters, instead of showing me the site.

    What am I missing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would highly suggest using LocalWP instead of the WAMP/MAMP/XAMPP for developing the WordPress sites. You don’t need to create the host manually. You can watch this [video] tutorial.

    For WAMP issue, I’d be glad to help you troubleshoot the issue with duplicating your live WordPress site to your Windows 10 PC using Wamp. Here’s a breakdown of the potential problems and solutions:

    1. File Permissions:

    • Check file permissions on the copied files and folders in c:\wamp64\www\mysite.local. Wamp requires write access for certain files (e.g., wp-config.php, uploads) to function properly.
      • Right-click on the mysite.local folder, go to “Properties” > “Security” tab.
      • Ensure “Apache” or “IUSR” user has “Modify” permissions at least.

    2. wp-config.php Configuration:

    • Double-check the database details in wp-config.php for typos:
      • DB_NAME should match the actual database name you imported.
      • DB_USER and DB_PASSWORD should match your database credentials (might be different from root if you created a separate user).
      • Consider using a security plugin to manage database credentials instead of storing them directly in wp-config.php.

    3. Missing Permalinks Update:

    • Since you imported the database from a live site, permalinks might need to be reset.
      • Access your WordPress installation by adding /wp-admin to the URL (e.g., https://mysite.local/wp-admin). If this works, log in and go to Settings > Permalinks > Save Changes. This should update permalink structures.

    4. Conflicting VirtualHost Configuration:

    • If other virtual hosts exist in httpd-vhosts.conf, ensure your mysite.local configuration is placed at the bottom to take precedence.
    • Restart Wamp server after making changes to httpd-vhosts.conf.

    5. Corrupted Database Import:

    • Consider re-exporting the database from your live site and re-importing it into your local Wamp installation. Double-check for any errors during the import process.

    Additional Tips:

    • Disable Security Plugins (Temporarily): If you’re using security plugins on the live site, temporarily deactivate them during the duplication process. You can re-enable them after everything is set up locally.
    • Flush Cache: Sometimes, cached data can interfere. Clear your browser cache and try accessing mysite.local again.

    By following these steps and checking each potential issue systematically, you should be able to resolve the “save file window” problem and successfully view your duplicated WordPress site on mysite.local.

    If the issue persists after trying these solutions, consider providing more details:

    • Any error messages in Wamp server logs or database import process.
    • The specific version of WordPress you’re using.
    • Whether you’re using a custom theme or plugins on the live site that might require additional configuration.

    With more information, I can assist you further in troubleshooting this specific instance.

    Clicking on mysite.local it opens a save file window with random letters as the file name, every time different letters, instead of showing me the site.

    Are you able to run a basic PHP file, like a “Hello World” script or phpinfo(); file? I suspect your PHP installation might have an issue.

    Anyway, unless you’re heavily married to WAMP, I’d also recommend LocalWP for local WordPress development.

    Thread Starter SigalZ

    (@sigalz)

    Thank you very much.

    My Wamp works fine withe other sites I am working on which are not WordPress.

    I installed the site with LocalWP, it says the site is running but going to the site or WP Admin gives me code in the browser instead of the site.

    Can you please help me with this problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Live site to Local server using Wamp’ is closed to new replies.