We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5122
    • 5 Posts
    Hello:

    Last night my older site was hacked. Someone basically took my index.php and completely rewrote it and I’m at a loss on how to get my site back up. I copied the index.php file from the Modx install package so my home page shows just fine. But every single other page is returning a 404. I can see my pages in the modx admin tool and it says they’re published but they do not show up on the site.

    Any help you could provide would be much appreciated. And yes I WILL be upgrading to the absolute latest version this week.

    Thanks.

    Chris

    Environment:

    ModX: 0.9.6.3
    OS: Unix
    Shared Host
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You could try clearing the site cache, then upload the original install folder and run the installer in upgrade mode.

      From what you’re saying, I presume you don’t have a backup of the site from before it was hacked?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 5122
        • 5 Posts
        Hi. Thanks for your help with this. No unfortunately I don’t have a backup that is current enough (completely my fault). I guess I’ll have to give your suggestion a shot and see what happens.

        Thanks.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Also check your .htaccess file; make sure that wasn’t disturbed. That’s often the cause of 404 errors since the friendly URLs need that to work properly.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            Hello Chris,

            The process of restoring a website is rather time consuming, you must secure the server, and then review all the files to check for backdoors. Once they are all checked you can put the site back up and review things in the manager and then some.

            If you need a hand getting it up quickly, let me know ([email protected]) as I can help on that front.

            Thanks!
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 5122
              • 5 Posts
              Thanks everyone for your help. Back up and running. First order of business is to update to the latest and patch up all of the holes!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Updating such an old version requires a bit of care, since some of the snippets have changed and the old parameters don’t work any more.

                What I do in that case is to not update any of the snippets, by not uploading the snippets folder and clearing their checkboxes during the installation. Then I go in and update each snippet manually one at a time, to see what needs to be changed in the snippet calls.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org