Wordpress posts don't show up
I recently moved my wordpress to a new host and I get the following error on the home page:
Not Found
Sorry, but you are looking for something that isn't here.
The corresponding code (in index.php) is:
<?php if (have_posts()) : while(have_posts()) : the_post();开发者_StackOverflow ?>
...
<?php endwhile; else: ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
I don't understand why it doesn't find any posts to show?
I'd really appreciate any help. Many thanks!
a few things to check:
- That the homepage is set to view posts (Settings > Reading)
- That the correct theme has been set (Appearance > Themes)
- The domain name is correct for the new host - that it isn't forwarding you back to an old domain. (Settings > General)
another option is to start again with a new wordpress setup and using Tools > Export and Tools > Import you can transfer all your old content.
hope that helps. Josh
Check/delete .htaccess and reset permalinks. Moving WordPress « WordPress Codex and Using Permalinks « WordPress Codex.
Deactivate all plugins. Make sure that all WordPress files were transferred successfully. Resave your permalink structure in Options > Permalinks.
If you switched hosts the first thing I would check is your database connection string stored in your wp-config.php file.
You'll need to update this with the path/user/password to your new database.
精彩评论