• Well, what to say… I’ve dozens of wordpress sites but this time on a new install I get the

    Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/wp-config.php:1) in /home/digfotit/public_html/wp-admin/install.php on line 36

    Well, there is no space anywhere in wp_config.php and I’m lost.

    From your experience might be related to my host, to php version, to ….?

    I would say no but now I’m open to all solutions…

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s unlikely to relate to anything other than blank space or a newline at the start of the wp-config file.

    Thread Starter andrea82

    (@andrea82)

    Are you 100% sure?
    I ask this simply because it’s just the code in the wp-config-sample.php

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
     * visiting {@link https://codex.www.ads-software.com/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'putyourdbnamehere');
    
    /** MySQL database username */
    define('DB_USER', 'usernamehere');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere');
    
    /** 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.www.ads-software.com/secret-key/1.1/ www.ads-software.com secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY', 'put your unique phrase here');
    define('SECURE_AUTH_KEY', 'put your unique phrase here');
    define('LOGGED_IN_KEY', 'put your unique phrase here');
    define('NONCE_KEY', 'put your unique phrase here');
    /**#@-*/
    
    /**
     * 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. */
    
    /** 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');

    That’s it! I don’t see spaces anywhere (same thing after I’ve defined database name, username and pwd).

    So, there’s absolutely anything else I should look at whenever I have the error for wich I started this thread?

    Yep the error is fairly specific. How are you editing / transfering the file?

    Thread Starter andrea82

    (@andrea82)

    Take the file from the folder and I put in Filezilla remote server.

    It could be your editor at fault, try using notepad+ or vim.

    Hi! I was having exactly the same problem! There was this error and there was no blank space before <?php… How did i solve it?

    GET PREPARED!

    Simple! Just download a fresh wordpress zip and extract it. Don’t create any wp-config.php file. Just leave the files as they come when they are extracted. Then upload the folder (or just it’s content) to your server and try to access wp-admin/install.php by your browser. WordPress will say that the “wp-config.php” file was not created and will ask you if you want to make it using your browser. Say yes, type the settings and be very happy :D!!!!!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fresh Install – Cannot modify header information, wp-config.php:1’ is closed to new replies.