WordPress.org

Ready to get started?Download WordPress

Forums

Messed up wp.config file and now my posts and pages are gone (7 posts)

  1. dv8
    Member
    Posted 2 months ago #

    I was an idiot and didn't make a backup before editing the wp-config file.

    All I did was add a line of code to the bottom of it. When I reloaded my site, it gave me a white screen with a few lines of text (no, don't remember what it said). So I removed the code and tried again. No luck.

    So I edited my wp-config-sample file with my database info, username and password and made that my new wp-config file. Tried my site and this time I got the screen to set up a new wordpress install. After trying to find a solution with no luck, I just filled out the info to see what would happen. I could get back in, themes are still there, but my pages and posts are gone. Only ones are the standard hello world and sample page.

    I went into phpMyAdmin to check the database there. It appears the posts and pages are in there.

    Is there a way to get them back on my site?

    Not sure why just uploading a new wp-config file with my database info didn't do the trick??

  2. Dave Naylor
    Member
    Posted 2 months ago #

    If you're sure that you've used the correct database credentials, maybe you used a different table prefix in the new wp-config.php file. If that's the case, your database will have two separate sets of tables and effectively two installations.

    Check the file and compare it to what you see in Phpmyadmin.

    Edit: typo corrected

  3. dv8
    Member
    Posted 2 months ago #

    Where is the wp-content file?

    I see my wp-content FOLDER, but not the file.

  4. dv8
    Member
    Posted 2 months ago #

    Just realized all of my media content is gone as well. Yet, when I look at my site files in an FTP program, all of my media shows up there.

    Plugins are still there. They were all deactivated, but still there.

  5. Dave Naylor
    Member
    Posted 2 months ago #

    Sorry my mistake, I meant wp-config.php.

  6. dv8
    Member
    Posted 2 months ago #

    I just double checked, everything is correct.

    I contacted my host to see if they have a recent site backup I can just restore to.

    Thank you for your time and help, Dave. I appreciate it.

  7. dv8
    Member
    Posted 2 months ago #

    My host doesn't have a backup because I exceeded my inodes.

Reply

You must log in to post.

About this Topic

Tags