• Resolved lifeinnerlasting

    (@lifeinnerlasting)


    I had a WordPress site up and running for a couple months. It was running on my home server in a portainer stack with MySQL database.

    My server needed to be restored from a back up. Most of my portainer configurations were still available, including my WordPress. When I went to my site admin panel it had me go through the installation process again choosing language and whatnot.

    When I got to the admin panel, my entire site was seemingly erased, but some of my themes and random settings were still available. When I navigated to the website externally the home page still had all of the original layout and media, but all of the page links took me to the “new” layout.

    I’m willing to start over from scratch. This was just a test site. Though I’d like to be able to recover it if possible. And at the very least I’d like to learn from my mistake, but I’m not sure what exactly I did wrong.

    I have two possible theories. One, it feels like WordPress somehow did a “reinstall” over the previous install, causing some of the data to come from the old site and some from the new site. Two, I could have simply logged into accounts wrong. Somehow the “old” site is no longer accessible via woocommerce either.

    • This topic was modified 2 years, 10 months ago by Jan Dembowski.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Did you restore the database? That’s where the site’s content is. If you only installed the files and then ran the installer, it would create a blank WP site. If WP detects a database with contents, it will not run the installer, so it’s most likely that it saw either an empty database or a database that did not have any tables beginning with the table_prefix specified in wp-config.php.

    If you didn’t explicitly back up the database, you *may* be able to just (1) shut down MySQL, (2) restore /var/lib/mysql and its subdirectories and then (3) restart MySQL. Probably. Maybe. Good luck.

    Also, I’m not sure what a portainer is. One of those docker things, I guess.

    Thread Starter lifeinnerlasting

    (@lifeinnerlasting)

    I apologize in advance for my ignorance, I think my confusion is surrounding databases.

    I was under the impression that the content of the database was stored somewhere in /var/lib/mysql since that was the only place I gave the docker container access to. So I thought backing up the /var/lib/mysql folder would have been enough. Was I suppose to do an additional backup through MySQL?

    I followed your suggested steps. I anticipated it to show me the re-install page again. However, its showing me the “new” site. I’m even more confused now.

    Dion

    (@diondesigns)

    Did you shut down the MySQL service before making the /var/lib/mysql backup? If not, every database table that uses the InnoDB storage engine will be corrupted.

    Thread Starter lifeinnerlasting

    (@lifeinnerlasting)

    So if I’m running WordPress in a docker stack with the database… what is the best practice for maintaining and restoring a backup? Do I have to turn off the database every time I want to back it up? Is this normal? And then I just stop/start the container again if I need to restore it?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    for future reference, “man mysqldump”.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Server Restored, Reinstall’ is closed to new replies.