Forums

After migrating to new host, can't write to database (5 posts)

  1. theresse
    Member
    Posted 2 years ago #

    Migrated wp-site to a new host. Migration went ok, the site is up and running and I can log into admin panel, view the site, and all the links are working to pages and posts.

    However, I cannot write anything to database.

    When I try to create a new page or a new post or install a plugin I get an error message.

    Warning: Cannot modify header information - headers already sent by (output started at /foo/foo/foo/wp-config.php:24) in /foo/foo/foo//wp-includes/pluggable.php on line 391

  2. whooami
    Member
    Posted 2 years ago #

    Warning: Cannot modify header information - headers already sent by (output started at /foo/foo/foo/wp-config.php:24) in /foo/foo/foo//wp-includes/pluggable.php on line 391

    there are spaces or hidden "stuff/characters" at the bottom of your wp-config.php

    when you remove them, that error will go away.

  3. theresse
    Member
    Posted 2 years ago #

    I tried deleting any stuff beyond and I'm still getting the same error message, even with a new fresh install of WP. Suggestions? Here is my config file. Could it be a problem with my database?

    <?php
    define('DB_NAME', 'foo');

    /** MySQL database username */
    define('DB_USER', 'foo');

    /** MySQL database password */
    define('DB_PASSWORD', 'foo');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
    *
    * @since 2.6.0
    */
    define('AUTH_KEY', 'wYdUNR2vewQXesfwEglAHfzNtmMv16zvmIXb60laAhvxTgwnpgcBGidH93s6So6C');
    define('SECURE_AUTH_KEY', 'wYdUNR2vewQXesfwEglAHfzNtmMv16zvmIXb60laAhvxTgwnpgcBGidH93s6So6C');
    define('LOGGED_IN_KEY', 'wYdUNR2vewQXesfwEglAHfzNtmMv16zvmIXb60laAhvxTgwnpgcBGidH93s6So6C');
    define('NONCE_KEY', 'wYdUNR2vewQXesfwEglAHfzNtmMv16zvmIXb60laAhvxTgwnpgcBGidH93s6So6C');
    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
    * language support.
    */
    define ('WPLANG', '');

    /* That's all, stop editing! Happy blogging. */

    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    ?>

  4. whooami
    Member
    Posted 2 years ago #

    Could it be a problem with my database?

    NO.

    and while we are here, why are you using the same keys?

    You dont have to remember them -- make them unique..

  5. whooami
    Member
    Posted 2 years ago #

    since line 24 looks to be right before your first key is entered, make sure that you have no "hidden stuff" before that line.

Topic Closed

This topic has been closed to new replies.

About this Topic