luca
luca

Reputation: 37136

Wordpress: move site online 500 Internal error

Hi Hi have a working website on localhost that I want to move online. I'm using WP 3.2.1 and I exported the DB from my localhost. After that I just opened the .sql file with a text editor and replaced all of the 'http://localhost/mysite' with 'http://mynewdomain.com'. After that I edited the wp-config.php file for the new destination DB online,and so I uploaded everything online. I can see the index.php page correctly (apart from espanol,chinese etc characters broken) and few other secitons but if I try to reach the wp-admin section ..and whenever i try to browse to any another site's section I get the following error:

Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.***.it/home/wp-content/themes/ottaviano/shortcodes.php:55) in /web/htdocs/www.***.it/home/wp-includes/pluggable.php on line 934

My htaccess

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

SOLVED: I had to enable the output buffering and everything is fine again!

Upvotes: 1

Views: 7409

Answers (2)

mch
mch

Reputation: 1279

Just had a similar problem when moving a Wordpress site from one domain to the other (Error 500 - page not found).

Apparently a whitespace character found its way before the beginning <?php declaration in a template file.
You can trace the error by inserting a exit("wtf")? in index.php and "WTF-ing" your way to the affected file.

In my case, the reason was a move from Apple-based OS to Windows with differences in CR/LF handling.

Upvotes: 0

Cyclonecode
Cyclonecode

Reputation: 30071

Try to temporary remove your .htaccess file and see if you can access your admin again.

Restore you .htaccess and try adding:

define('WP_DEBUG', true);

into the top of your wp-config.php if this doesn't work you also try adding the code below to the bottom of the wp-config.php

ini_set('display_errors',1);
error_reporting(E_ALL);

and hopefully you get some error messages telling you what is going on.

Upvotes: 2

Related Questions