A few days ago, we had a client reach out to us because they could not get a successful import of an archive.
Here are the specifics. The client had created an archive from their live site using the Duplicator plugin (free from the WordPress Repository and compatible with DesktopServer). The archive was then downloaded to their computer to be imported. Though it imported as expected with no error, when either the site or WordPress dashboard were visited, it presented a white screen.
This type of error can be caused by an .htaccess file among several other things listed on the Common WordPress Errors page. The client contacted our support and we went through many of these trying to find the issue. The client was then asked to send the archive to us where we could do further evaluation.
It was imported on a support machine and we were able to recreate the issue. Upon further investigation, it was found that the /wp-includes/load.php file had code that was not standard in the WordPress core files. This lead us to believe that the site had been hacked.
To resolve the issue we used a new feature in 3.8.x and above – DS-CLI. DS-CLI allows you to run WP-CLI commands on a local WordPress website. Since we did not know how widespread the hack was we wanted to get all the core files replaced and this can easily be done by opening up a DS-CLI window and entering the following command:
wp code download –force
This will pull down all new WordPress code files replacing the existing ones. This appeared to resolve the issue. The white screen no longer appeared and the site came up. We recommended to the client that they replace plugins as well as consider replacing the theme as they also could have been infected by this hack.
Also noted was a user with administrator rights with the username of “admin”. It was recommended to delete this account and create a new administrator account with a unique username.
There are a number of situations in which DS-CLI can be used to resolve WordPress issues. We highly recommend that you play around with it a bit, read up on WP-CLI and its capabilities (as DS-CLI contains all of the WP-CLI functionality) to see how it can improve your workflow.