Jump to content

Reinstall WHMCS keeping existing database


Recommended Posts

I have strong reasons to believe that when my site got hacked bogus files were put in whmcs that I have no way of knowing if they are true whmcs files or trojan files meant to access whmcs and my website's files.


As a result, I am hoping to just delete all my files and reinstall whmcs from scratch to have fresh files in the folder but keep my existing database and all client information ... etc.


What is the best way to do that?



Link to comment
Share on other sites

Backup your database. Save your templates (.tpl files shouldn't be a problem). If necessary also save includes/additionaldomainfields.php, includes/whoisservers.php and all content of includes/hooks directory. In case you have custom pages you also need to backup all your custom .php files in the root of your WHMCS. If possible open them just to ensure that there's nothing wrong inside. Remember to backup your server modules, addon modules, registrar modules and payment gateways if you have installed additional ones.


Install a new WHMCS and once finished import your old database. Keep in mind that the version of the newly installed WHMCS should match the version of the old one. And now the most important part. Since you suspect that you've been compromised, do not use your old $cc_encryption_hash of your configuration.php file. Just use the new one but you'll be forced to regenerate all password :(


p.s. Wait for more suggestion since I wrote this post very quicky and probably I missed something.


p.p.s. Meanwhile you could try to perform a scan with softwares like Malwarebytes. I know that it might sound strange but most of times they can detect web-based trojans and rootkits.

Link to comment
Share on other sites

I am trying to do the same thing for similar reasons. My old install couldn't upgrade for some reason.


I was going to do new install of files, but not run setup yet. Then restore DB, edit config files for db access, replace needed files and hope the new files would see old db version and do update on first run.


Sound good?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated