Support » Fixing WordPress » Deleted WordPress folder! How Do I Recover It?

  • Resolved pack121


    I accidentally deleted the root folder for my wordpress install… how do I get it back?

    So far I reuploaded a fresh install and changed the table prefix in the config file to the original… I’m not sure how to get it working again, but I’m assuming all the posts and pages are still intact on the server.

    I’m guessing there’s something I can do on my end to recover it. Any tips would be appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff


    Volunteer Moderator 🚀

    The posts and other content are safe in the database. Just make sure that you’ve set the wp-config.php file to point to the right database.

    I checked and its the right database. I’m thinking the config file is just used for the installation step. I’m not sure how to get this setup going again without overwriting things.

    If all you did was delete the WP folder, then all you have to do is download a fresh copy, make the sure the config file contains the same info (as James explained) as the original and upload it. You’ll also have to reupload any themes/plugins that may have been lost.

    I’m thinking the config file is just used for the installation step

    It is not just used for installation.

    Everything looks right to me in the config file. This is what I get when I try to load the root domain (with the address swapped out for the location on the server)

    ' ); } } ?> _HOST ); } ?> ?> ter() ) return str_replace( 'WordPress', 'WordPress', $text ); // Still here? Use the more judicious replacement static $dblq = false; if ( false === $dblq ) $dblq = _x('“', 'opening curly quote'); return str_replace( array( ' WordPress', '‘Wordpress', $dblq . 'WordPress', '>WordPress', '(WordPress' ), array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ), $text ); } ?> ) ) return true; } return false; } ?> t', array(&$post)); return true; } ?> _theme_mod' ); ?> result = " $type='$type'"; else $result = ''; if ( $echo ) echo $result; return $result; } ?> } ?>
    Parse error: syntax error, unexpected ')' in /wp-includes/post.php on line 4721

    I checked line 4721 of post.php and it reads this:

    if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )

    not sure what to do?

    If you have deleted ‘wp-content’ which holds the plugins, uploads, images etc: the paths and names of these will no longer match the urls in the posts etc:, so it may not be as easy unless you only had text content.

    If you have paid hosting ask your hosting company to restore the folders and or files from the last backup, and save the pain!

    If they do not do it for free and within a couple of hours change hosting company!



    They do it for free, except they have to roll back the whole account of mine which would undo too much of my work.

    I realized I had an older WP install, so I uploaded 2.9.2 instead and now the error message is gone.. now it loads a blank root screen instead of the error.

    Still not working though..

    happy thanksgiving!

    WOO! Ok I got it back up. It just needed the older WP version and adding back all old plugins.

    Thanks for the help y’all

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Deleted WordPress folder! How Do I Recover It?’ is closed to new replies.