WordPress.org

Ready to get started?Download WordPress

Forums

How to move live site to localhost (7 posts)

  1. luffer
    Member
    Posted 4 years ago #

    I've got XAMPP installed and working fine, I've got a copy of my database set up in it using PHPMyAdmin. I've copied all the files from my server to the xampp/htdocs/ folder.

    What settings do I have to change to actually access the site on my localmachine?

  2. Samuel B
    moderator
    Posted 4 years ago #

  3. ramadev
    Member
    Posted 4 years ago #

    samboll - I have a similar situation with my wp 2.7.1 site that I want to work on locally. I am using MAMP 1.8.4 on my imac-isight (PPC).

    I followed the instructions that were given on the page you linked

    ---I chose to include these in my wp-config.php:

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    I can get to my homepage at localhost:8888 but cannot browse freely. Errors pop up like:

    (Cannot modify header information - headers already sent by) accessing several pages, and some items are missing (an swf file for instance).

    Also, when I try going to http://localhost:8888//wp-login.php, I get to the login page but it has the following at the top before the userid:pw fields:

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-login.php on line 255

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-login.php on line 267

    After login, I get lots more of them:

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-login.php on line 255

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-login.php on line 267

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-includes/pluggable.php on line 649

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-includes/pluggable.php on line 650

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-includes/pluggable.php on line 651

    Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/keyrome_theme/functions.php:22) in /Applications/MAMP/htdocs/wordpress/wp-includes/pluggable.php on line 850

    I tried reading a few threads on this warning, but I'm not finding an answer for my low knowledge level to do anything with.

    Can you enlighten me? I want to be able to work on an offline version of my site (test upgrade to 2.9.1 and do some redesign).

    Perhaps I just messed up the mysql database or something, can't figure it our.

    Thanks!

  4. Samuel B
    moderator
    Posted 4 years ago #

    it looks like all errors are coming from your theme
    what happens when you switch to default theme?

  5. luffer
    Member
    Posted 4 years ago #

    I'm still having trouble with this, I am also getting errors on my page, and when I try to go to the dashboard (/wp-admin) I just see this:

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\techietalk\wp-content\plugins\all-in-one-seo-pack\aioseop.class.php:4545) in C:\xampp\htdocs\techietalk\wp-content\plugins\bad-behavior\bad-behavior\screener.inc.php on line 8

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\techietalk\wp-content\plugins\all-in-one-seo-pack\aioseop.class.php:4545) in C:\xampp\htdocs\techietalk\wp-includes\pluggable.php on line 868

  6. luffer
    Member
    Posted 4 years ago #

    Hmmm, I deactivated all plugins and managed to get to the dashboard. But now it says my theme is broken! But it works fine on the live site... tried changing it to something else and get another error:

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\techietalk\wp-content\themes\streamline_20\functions.php:43) in C:\xampp\htdocs\techietalk\wp-includes\pluggable.php on line 868

    What the hell does that mean in English? :-)

  7. s_ha_dum
    Member
    Posted 4 years ago #

    What the hell does that mean in English? :-)

    You have to send http headers, which you as a user never ordinarily see, before you send any kind of content. If something goes wrong and the software echoes content before sending the headers, you get this message, though arguably is should read more like "Content sent before headers." I suppose you'd also get the error if you actually did try to send headers a second time but I don't think I ever actually seen that happen. So in other words, something in functions.php is sending content prematurely-- out of appropriate sequence. See that "Output started at..." part? That tells you, well, where the output started. The problem is in your theme.

    Chances are that you are missing some files, which is triggering errors, which is printing error messages before the headers get sent. Just my guess. :) Do not trust FTP with large downloads of nested files and folders. (ramadev, having a seemingly similar problem, even mentioned that "some items are missing".) Go back and make sure that everything downloaded from your server.

Topic Closed

This topic has been closed to new replies.

About this Topic