Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I'm trying to set up Wordpress to run through Phpmyadmin, in conjunction with LAMP. I'm running Ubuntu 12.10(if that matters), and I haven't found the answer to this question on this site yet.....

My problem is, when I get on wordpress(localhost/wordpress works fine) Every time I try to enter the information to configure wordpress with phpmyadmin, a page comes up that says:

"Sorry, but I can’t write the wp-config.php file.

You can create the wp-config.php manually and paste the following text into it."

Then it's followed by a box of code that I have no clue what I'm supposed to do with:

<?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 http://codex.wordpress.org/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', 'wordpress');

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

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

/** 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 and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org 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',         'D4cRfQDV7@3:<^vs_E/m]u54A},Pto1pt-s8{o7~3xQ*<pN(HSnMHIiK@J@LiiAl');
define('SECURE_AUTH_KEY',  '|A30]LIZeOB%7{x=[PM`rX+ukS$+J+7$((Gx-0y-{RsDkq~lN;VS@Jx|m0I8CV/]');
define('LOGGED_IN_KEY',    '+kk}.-Z,@%x|9]SnW{-.,L{-m+cFwRf$)eXn-gxFD_x74uI>~F#i:LaqWr7=%@y]');
define('NONCE_KEY',        'aCO>P82i{I/O9+JL-V|W*b?UG&?n|T/T~I=`NZ>jB2>:#OR^o%5`bY_DgyNV2(~w');
define('AUTH_SALT',        'J1PAd.KK^owkw .LQ@?@aYZp4?4SwolCUw5Wq7CftHxO-jM[7}3n^6W!A?%P+m#0');
define('SECURE_AUTH_SALT', 'DJr+.-i=Rb)lJ[Xi%r=&lv(?,#q,PX/BCm 7hz2[2b?XXzp}~[)F{_+Ol1rcG*T]');
define('LOGGED_IN_SALT',   '[!^(2JJ#GcI2`-Bc8(+jt~E8k_`Kg%6Q<6L>1f~Ed,NVnhcaY]Z2ul1a=5xA<vN)');
define('NONCE_SALT',       'S=]6]TVywDI-(>+)PA3,B;^:aKXx<Q#v[x?rL-FZMjH~r!.3hiuJ+v;a,060)J2[');

/**#@-*/

/**
 * 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_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
 * language support.
 */
define('WPLANG', '');

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */
define('WP_DEBUG', false);

/* 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');  

I'm a bit of a noob(obviously), so this has me stumped. I've tried uninstalling and reinstalling every program in LAMP, I've created new users, passwords, databases, ect. in phpmyadmin, and I still can't get this to work.

I'm forced to post the question here because every tutorial I've seen about setting up Wordpress doesn't seem to have this issue.

Thank you!

share|improve this question
    
maybe do what it says, make a wp-config.php file and paste the code in? –  Xylo Dec 29 '13 at 23:20
    
See, this is where my noob status comes in. Where would I paste it? How would I change the code to make it work, because it's obviously not working the way it's written? Why is this code coming up in the first place, when it seems like no one else has this issue? –  user229952 Dec 29 '13 at 23:41
    
@user229952 The wp-config.php file should be at the root level of your Wordpress installation. I'd suggest studying the Wordpress installation instructions as it has complete walk-through instructions. –  douggro Dec 30 '13 at 0:53
    
I've gone through the instructions many times. I've done everything exactly as they said, uninstalled everything, reinstalled everything, and did it the exact same way again. I still can't seem to get it to work. That's why I asked the question here. –  user229952 Dec 30 '13 at 5:34
    
The problem may be that the permissions for the wp-config.php file need to be changed for writing to during your setup. Open a Terminal session (Cntl-Alt-T) and try sudo chmod 775 /path/to/your/wordpress/installation/wp-config.php and run the setup again. If it is successful, change the permissions back using sudo chmod 644 /path/to/your/wordpress/installation/wp-config.php to protect it from being read by the outside world. –  douggro Dec 30 '13 at 17:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.