Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Uploaded WP 3.0 site not loading WordPress

  • SOLVED

I have, I think successfully, learnt quite a bit about WP from scratch in the last 4-5 weeks and, working offline using XAMPP and WP 3.0, converted my fairly large (100+page and 100s of images) site from trad. HTML to WP. All is working very well offline on my local server.

I have struggled with uploading it. Firstly, trying to export the entire SQL database (using PHP My Admin, etc.) of tables produced errors. I got round this by exporting/importing table by table. The biggest table - pages.sql - would export if I didn't change the refs from localhost to www, but produced errors if I did (using Notepad). Anyway, I exported/imported and then used the SQL command to change the refs on that file/table.

I am fairly sure that all the tables are properly exported/imported, as are all the images. I say this because I can log in and edit the WP site and its pages and correctly see the text together with all the page images. [As a 'legacy' site it is page-based, not comment/blog based].

However, the pages will not load otherwise and produce 404 Not Found errors.
Obviously, there are problems with WPs internal page URLs that need sorting out. I think I'm out of my comfort zone and need a kind expert to do the online search-and-replace correction actions. Naturally, whoever will need login information, but obviously I'll not give that out publicly.

Answers (4)

2010-09-16

Jonah Schulte answers:

It sounds like you haven't uploaded the .htaccess file to your web server. Double check that it exists on the server in the same folder as your wordpress install. Also, in the admin, go to Permalinks under settings and just hit "save" again to make sure those settings are active. Does that fix the problem?


Jonah Schulte comments:

Just to clarify, you should add a file to the root folder of your wordpress install (alongside index.php, wp-content, wp-includes, etc) called .htaccess (including the dot in front) and it should have this inside:


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


If that doesn't fix the problem, feel free to send me a private message with the FTP and admin login info for your site and I can take a look and fix the problem for you!

Cheers,
Jonah


Jonah Schulte comments:

If your wordpress installation is in a subfolder within your domain, you'll need to do something like this in the .htaccess file:


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /french-waterways/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /french-waterways/index.php [L]
</IfModule>
# END WordPress


Jonah Schulte comments:

I think you may need to use /french-waterways/waterpress/ for the path in RewriteBase and the second RewriteRule:


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /french-waterways/waterpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /french-waterways/waterpress/index.php [L]
</IfModule>
# END WordPress


NickStrong comments:

You're right that I haven't done anything with an htaccess file.
I have to leave my computer and sign off right now, but I'll return hopefully in an hour or so.


Jonah Schulte comments:

Ok, keep me posted! I think just adding the file (in one of the configurations I listed above) will fix the issue for you.

2010-09-16

Rashad Aliyev answers:

Which site is it?

did you check your permalinks?


NickStrong comments:

Thanks for the response.
Obviously I can't give you a WP URL, because that is not working.
The existing site is at www.tagweb.co.uk/french-waterways. The WP installation is at www.tagweb.co.uk/french-waterways/waterpress I need page refs to be of the format www.tagweb.co.uk/french-waterways/pageurl.html etc.
Obviously, it might well be the permalinks, but what should I check them for / as being?


NickStrong comments:

I should add that, offline / locally, the Permalinks do operate correctly as type localhost/pageurl.html etc.


Rashad Aliyev comments:

If you're make all of settings for your new host. And still not working. then you can create .htaccess file manually..

I'll give you htaccess file. Put it to your root and check it again.



# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress



Rashad Aliyev comments:

Change your wp site permalinks to default then test it again.. if it's working then make an special permalinks for your site.

2010-09-16

Denzel Chia answers:

Hi,

<blockquote>
The existing site is at www.tagweb.co.uk/french-waterways. The WP installation is at www.tagweb.co.uk/french-waterways/waterpress I need page refs to be of the format www.tagweb.co.uk/french-waterways/pageurl.html etc.
</blockquote>

Currently all your post/page url is http://www.tagweb.co.uk/french-waterways/pageurl.html which is causing the 404 error.
Because the url should be http://www.tagweb.co.uk/french-waterways/waterpress/pageurl.html

Changing the htaccess rewrite rules will not help, because I am sure that in your wordpress database post table the guid field is http://www.tagweb.co.uk/french-waterways/pageurl.html without the waterways folder.

You should export your posts from wordpress admin and import using
http://wordpress.org/extend/plugins/wordpress-importer/ instead of doing mysql export.

But for now you should write a mysql query to fix all the post guid to http://www.tagweb.co.uk/french-waterways/waterpress/pageurl.html

Then follow the example from http://codex.wordpress.org/Function_Reference/WP_Rewrite
to let wordpress rewrite url to http://www.tagweb.co.uk/french-waterways/pageurl.html

Thanks.

Denzel




2010-09-16

Chris Murphy answers:

Attempt the following steps:

1. Check your DB to ensure that your siteurl is correct for your production server, e.g. "wp_options" -- you can search for it using this query:
SELECT option_name, option_value FROM wp_options WHERE option_name = 'siteurl';
And reset it using this one:
UPDATE wp_options SET option_value = 'http://your.newdomain.com' WHERE option_name = 'siteurl';

2. Reset your permalink structure using this query:
UPDATE wp_options SET option_value = '' WHERE option_name = 'rewrite_rules';

3. Delete your .htaccess file

4. Physically remove your plugins from the wp-content/plugins directory (this will prevent them from loading)

5. Check to see if your site it loading with the defaults

6. Log into the admin area and go to Settings->Permalinks and choose the structure you want (or keep with the default), and then <strong>save your changes</strong>. This will force WP re-write the .htaccess file and update wp_options with the new settings.

7. Re-enable your plugins one by one--this step will test to see if there is a plugin conflict.

If your plug-ins load successfully, it is likely that there were problems with a combination of the permalink structure and your site url (they can be mutually exclusive issues).

If you want to future-proof the URIs in your Posts/Pages/etc. you can follow these instructions to implement a simple solution: [[LINK href="http://www.farfromfearless.com/2010/09/07/url-token-replacement-techniques-for-wordpress-3-0/"]]URL Token Replacement Techniques for WordPress 3.0[[/LINK]]


Here's a set of queries to update the URIs your posts/pages:
UPDATE wp_options SET option_value = REPLACE(option_value, "http://www.old-domain.com", "http://www.new-domain.com");
UPDATE wp_posts SET post_content = REPLACE(post_content, "http://www.old-domain.com", "http://www.new-domain.com");
UPDATE wp_posts SET post_content_filtered = REPLACE(post_content_filtered, "http://www.old-domain.com", "http://www.new-domain.com");
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, "http://www.old-domain.com", "http://www.new-domain.com");