Sometimes the unexpected happens.
I was recently asked to retrieve a WordPress website from a
.eu domain that had become void as it was registered in the UK and after 1st January 2022 this was no longer permitted (one of the effects of Brexit).
The site had just seemingly disappeared from the internet, so there was no access to the WordPress Dashboard. All was not lost, however, as the content within the public html folder was still accessible via ftp, and the WordPress database was visible via phpmyadmin.
I will outline the process I followed in the hope that it may be useful if you ever find yourself in a similar position.
Download website content via ftp.
Using the ftp program of your choice (I use FileZilla) download the contents of the
public.html folder from the missing website, making sure you have enough space for the files.
Export the database as
.sql through your web hosting control panel using phpmyadmin.
Upload content to the new website directory.
Import database using phpmyadmin. Don’t worry if you see the below error. This is because the credentials for the old database differ from the new.
You can work around this problem by using a program like Sublime Text to open the old database
.sql file and run a search and replace to switch the old database name for the new one.
This should work provided all table names remain unchanged, and you should see a success message like the one below:
This next step is probably the most critical. Firstly, you will need to obtain a copy of Search & Replace DB by Interconnect/it. This is a powerful open source program that allows you to perform search and replace actions across your whole database just in a few seconds.
Use this to replace the old url with the new url throughout the database. It is advisable to do a dry run first and ensure you are happy with the changes that are about to be made. Please read the instructions carefully and ensure you delete the folder it runs from when the process is complete.
If necessary, amend your DNS records to point to the new server. This may or may not apply depending how your original website was configured for redirects etc. DNS changes usually take effect within 24 hours.
Request a new SSL certificate.
You can see from the steps above that retrieving a lost WordPress website can be achieved providing you have access to the content and database. I have tried to illustrate how each step of the process is relatively straightforward and can be accomplished even by those with little knowledge or experience in this area. Don’t be afraid to try it – after all, what have you got to lose?