0

i haven't got any experience in wordpress so please sorry me if answers seems too trivial.

one upon a time i had a blog. then the hosting service expired and i get a backup in a hurry way: the bad way.

  • i copied all the root directory
  • i dumped the mysql database

now i've just paid for reactivate the host and i want to restore the blog project (BUT the directory is changed now, the file are no more in /htdocs/public/www but in /public/www/blog ), but i am experiencing some troubles.

  1. first of all i've fixed wp-config.php with the new database name, and new user, it seems to be OK.
  2. then i've done a copy of all files back in the server and redone a wordpress installations via wp-admin/install.php . updated wordpress and plugins.
  3. imported the database back with phpmyadmin.

now if i go to visit index.php i get this error after the title:

Error 404 - Not Found

Apologies, but we were unable to find what you were looking for. Perhaps searching will help.

and no css is loaded. i've tried the queries founded in this link but they have produced no changes in sql tables.

some advice?

1
  • It sounds like you most likely didn't restore the file structure properly. Inside the www directory you should upload a fresh WordPress install (as in: download the latest copy from wordpress.org, unzip it and upload the contents to the previously stated location). After you do that, update the NEW wp-config.php file to the right database credentials. Let us know what happens after that.
    – cmegown
    May 30, 2012 at 17:18

1 Answer 1

2

If you are not moving to a different domain name, the file path shouldn't really matter.

Try these first:

  1. Made a copy of your original backup bd
  2. Open the new copy and search/replace example.com/ to example.com/blog/

This should get you going no matter what server setup you have.

If it doesn't, and you already have a fresh install on the right place, open that copy file on a good pure-text editor (not MS Word) and remove the part that starts with:

--
-- Table structure for table `wp_options`
--
DROP TABLE IF EXISTS `wp_options`;

up until the last line before the next table, probably:

-- --------------------------------------------------------

--
-- Table structure for table `wp_postmeta`
--

Do the same for the tables wp_users and wp_usermeta.

Save yet another copy of the file and upload the new one. You should get all of your posts/comments/links/etc back inside the fresh install. You can then install any themes and plugins from scratch and pick up where you left of.

6
  • the first try was succesfull. just one more level: i've done string substitution with TextEdit, can you give me a regex for that?
    – nkint
    May 30, 2012 at 20:46
  • I never really use regex for that step. Since it is replacing hardcoded base URLs, string replacement should do just fine, unless your URL has port numbers or anything usual.
    – moraleida
    May 30, 2012 at 20:51
  • What's your current status? You have posts and comments but not categories and tags? Categories and Tags are there, but not linked to posts?
    – moraleida
    May 31, 2012 at 11:44
  • if i go yo url.com/blog i see the last post. in that page, if i click on a tag, on a category or on a archive i am reminded to a 404 page
    – nkint
    May 31, 2012 at 15:45
  • right. When you click the links, is the URL correct (according to your permalink settings)? Are you using one of the default themes?
    – moraleida
    May 31, 2012 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.