最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - What is the best way to resurrect and update my old WordPress site?

programmeradmin1浏览0评论

I had an old WordPress site that was neglected for several years. It had been hacked, and I disabled it. I'd like to now get it back up and running with the latest version (5.5.1).

I see from the version.php file that it was running WordPress version 4.5.16, and $wp_db_version was 36686. From what I can tell, the database does not have any corruption in it, just the old files. I have set up a new area for the website on a fresh server. My question is: Should I install the latest version right away and connect it to the old database data, or would it be better to download a fresh, uncorrupted copy of version 4.5.16, get that working, and then update it to the current version? Is there anything in the database from the old site that will give me problems if I try to run 5.5.1 without going through the update process? If I go straight to 5.5.1, will the software automatically update the database itself somehow?


Further explanation:

The site, where it was, is disabled; I will not be logging into the old site. What I do have is all the files and the database backed up. My question is: When I put this on a new server and get it back up and running, should I use the old WordPress core files (or better yet, download a fresh copy of 4.5.16), get that working with my database, and then update everything to the latest version? Or would it be better to skip that step, install the latest and greatest WordPress core files, and restore my old database in that?

As far as user content goes, the theme was a child theme for TwentyTen that I wrote myself; I will take care of restoring that and making sure it is updated and secure. The only other content files are images that I can restore. My question is specifically about which version of the WordPress core files I should connect to the database first.


PHP version: On my new server, the oldest PHP version I can run is 7.2. Would I even be able to run and update WP 4.5.16 under PHP 7.2?

I had an old WordPress site that was neglected for several years. It had been hacked, and I disabled it. I'd like to now get it back up and running with the latest version (5.5.1).

I see from the version.php file that it was running WordPress version 4.5.16, and $wp_db_version was 36686. From what I can tell, the database does not have any corruption in it, just the old files. I have set up a new area for the website on a fresh server. My question is: Should I install the latest version right away and connect it to the old database data, or would it be better to download a fresh, uncorrupted copy of version 4.5.16, get that working, and then update it to the current version? Is there anything in the database from the old site that will give me problems if I try to run 5.5.1 without going through the update process? If I go straight to 5.5.1, will the software automatically update the database itself somehow?


Further explanation:

The site, where it was, is disabled; I will not be logging into the old site. What I do have is all the files and the database backed up. My question is: When I put this on a new server and get it back up and running, should I use the old WordPress core files (or better yet, download a fresh copy of 4.5.16), get that working with my database, and then update everything to the latest version? Or would it be better to skip that step, install the latest and greatest WordPress core files, and restore my old database in that?

As far as user content goes, the theme was a child theme for TwentyTen that I wrote myself; I will take care of restoring that and making sure it is updated and secure. The only other content files are images that I can restore. My question is specifically about which version of the WordPress core files I should connect to the database first.


PHP version: On my new server, the oldest PHP version I can run is 7.2. Would I even be able to run and update WP 4.5.16 under PHP 7.2?

Share Improve this question edited Oct 15, 2020 at 0:55 Ben Miller asked Oct 13, 2020 at 20:40 Ben MillerBen Miller 2,1403 gold badges19 silver badges41 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

I decided not to try to install WP version 4.5.16 first, as I suspected it would have issues running in PHP 7.2+.

Instead, I installed WP version 5.5.1, running in PHP 7.4. I copied in my theme and uploads files, connected it to my old database (via wp-config.php), and ran it. WordPress detected the old database and updated it automatically. I have not reviewed the updates, but the site seems to be working well.

It all depends on how important the content is. Assuming you want to save the content, I'd:

  • backup the database
  • backup the settings file
  • backup the themes and plugins folder
  • make sure you can login as admin
  • update to latest WP version
  • update to PHP 7.2+
  • update all themes
  • update all plugins
  • check for any more updates, update accordingly

It's possible that a WP or theme update might bork the site; maybe a theme or plugin incompatibility when you update other things. You might change to one of the 'twenty' themes first before you start updating. You might also need to disable plugins (not delete).

You may also want to research the current theme and plugins to make sure they are compatible with latest WP versions.

After updating, change credentials everywhere (admin users, database, hosting, etc) with strong passwords.

发布评论

评论列表(0)

  1. 暂无评论