So recently I had a virus on my site and I’ve copied my WordPress content
folder to my local computer and did a backup of the database and whole site (using cPanel). Then I deleted everything from public_html
and installed fresh WordPress. After clearing content
folder from a virus I put it back and overwrite freshly installed wp. I connected WordPress to the old database. I set up a theme that I used and that is it. And after all this, my site is still blank. Also inside content
folder on hosting, I have images under content/uploads
folder but when I go in media
on admin panel, nothing is there. What is the problem?
Also i uploaded one image and it set it tho the folder content/2017/6/image
where i already have 10 images but in media library is only the latest one added
I found out the problem. Inside my database i have prefix WPN7_TableName
and at setup i set it to wp_TableName
. How can i change this?
2
Answers
I replaced
%table_prefix
insidewp-config.php
fromwp_
towpn7_
just like old one was.Well, try these and let me know if that helps.
N.B.: Remember you must completely backup both database and files on your server before proceeding further.
In your
wp-config.php
file add the below line at the very bottom:Now visit this page:
http://http://www.yoursite.com/wp-admin/maint/repair.php [Replace http://www.yoursite.com with your actual one]
And there you will see the option to repair the database. Go with that and check if that solves the problem.