We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53460
    • 69 Posts
    I'm having issues with moving a copy of a website to my local machine. I've moved other sites before and didn't have this level of issues.

    Here's what I've done so far:

    Downloaded the databases as SQL files
    Downloaded the files from FTP (no access to cPanel yet)
    Updated the following files with local URL (C:/Users/<user>/Documents/websites/ModX-Install/)
    /core/config/config.inc.php
    $database_user
    $database_password
    $database_dsn
    $modx_core_path
    $modx_processors_path
    $modx_connectors_path
    $modx_connectors_url
    $modx_manager_path
    $modx_manager_url
    $modx_base_path
    $modx_base_url
    $modx_assets_path
    $modx_assets_url
    $http_host='localhost';
    /config.core.php
    /manager/config.core.php

    Then I reuploaded the SQL files into new databases on localhost.
    Cleared the remaining files under /core/cache/.
    Commented out the .htaccess code referring to the original domain name.
    Revised the base url in the <head> with the ModX Site_URL.

    The only success is that the homepage and assets work when I load the local install. Everything else that I link to from there is met with an error:
    Not Found
    The requested URL /index.php was not found on this server.


    Any help would be greatly appreciated.

    Thanks
      • 22840
      • 1,572 Posts
      Sounds like you don't have the .htaccess file or it's not being utilised, you can turn off friendly urls in the settings in the manager section
        • 3749
        • 24,544 Posts
        First, delete all files in the core/cache directory.

        If you didn't run setup on the local install, do that.

        Make sure you have this tag in all templates (with the exclamation point):

        <base href="[[!++site_url]]" />


        If you do have an .htaccess file, check the Rewrite Base line. On remote servers it's usually just /, because a virtual host is set up, but on many localhost installs, it needs to indicate the subdirectory the MODX install is in. Be sure it has both a leading and trailing slash.

        For example, my local site is in localhost/ht_docs/addons/ so this goes in the .htaccess file:

        RewriteEngine On
        RewriteBase /addons/
        


        Also, make sure the rewrite engine is enabled in the local server, it's sometimes off by default.

        If none of that works, check the paths and URLs in core/config/config.inc.php and in the three config.core.php files in the following three directories: MODX root, manger, connectors.

        Ultimately, you may need to hard-code the paths and URLs, e.g.,:

            $modx_core_path= 'C:/xampp/htdocs/addons/core/';
            $modx_base_url= '/addons/';
        


          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting