|
wordpress not loading mySQL database
07-11-2011, 04:08 PM
|
wordpress not loading mySQL database
|
Posts: 45
Name: Noe Garcia
Location: The great state of TEXAS we'll kick yer ***!
|
this is kid of a wordpress and mySQL question but I installed wordpress in a new directory with the same mySQL database information and it started a brand new one. How do I get all my old posts and pages back?
__________________
Please login or register to view this content. Registration is FREE |personal portfolio and blog
|
|
|
|
07-11-2011, 04:46 PM
|
Re: wordpress not loading mySQL database
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
If you look in your wp-config.php file (it should be in the root folder where WordPress is installed) there are a few lines at the top tell WordPress where your database is. You should be able to copy the information from your old wp-config.php file to the new one and have your new installation pointing to the old database.
|
|
|
|
07-11-2011, 06:47 PM
|
Re: wordpress not loading mySQL database
|
Posts: 45
Name: Noe Garcia
Location: The great state of TEXAS we'll kick yer ***!
|
Code:
<?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', 'mydatabasename');
/** MySQL database username */
define('DB_USER', 'mydatabaseuser');
/** MySQL database password */
define('DB_PASSWORD', 'mydatabasepassword');
/** MySQL hostname */
define('DB_HOST', mydatabaseinfo');
/** 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', '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');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', '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_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');
thats my wpconfig file and I just took out the database info but everything is exactly the same as the old one and I didn't see anything at the top to change
__________________
Please login or register to view this content. Registration is FREE |personal portfolio and blog
|
|
|
|
07-12-2011, 02:26 PM
|
Re: wordpress not loading mySQL database
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
This is the info I thought might need changing
Quote:
/** The name of the database for WordPress */
define('DB_NAME', 'mydatabasename');
/** MySQL database username */
define('DB_USER', 'mydatabaseuser');
/** MySQL database password */
define('DB_PASSWORD', 'mydatabasepassword');
/** MySQL hostname */
define('DB_HOST', mydatabaseinfo');
|
If the values are pointing to the same database with the same username, etc as it had previously you should be reading whatever is in that database.
Have you accessed the database directly via phpMyAdmin to see if all your posts are there? Is it possible you accidentally overwrote the database when you installed WordPress again?
If there are two databases currently installed you either need to get the new install to point to the old database, which it should be doing if the wp-config files are the same. The alternative is to export the information from the old database into the new one.
|
|
|
|
07-12-2011, 04:17 PM
|
Re: wordpress not loading mySQL database
|
Posts: 45
Name: Noe Garcia
Location: The great state of TEXAS we'll kick yer ***!
|
I wasn't able to find where I could view that stuff in the database but I did see a log of activity and space used in the database so I know that my stuff is still there is there a way I can see what I stored in that database? my host support team are useless btw
__________________
Please login or register to view this content. Registration is FREE |personal portfolio and blog
|
|
|
|
07-13-2011, 01:50 PM
|
Re: wordpress not loading mySQL database
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
There should be some kind of control panel with your hosting account. Ideally it will contain a link to phpMyAdmin. Sometimes you have to click a link to MySQL databases first and the phpMyAdmin link will be in there.
Your host should provide access to the database in some way. If not you'd have to contact them to move any data around.
I'm guessing something is slightly different in the old and new wp-config files or there's something else in the WordPress settings pointing the new install to the new database instead of the old one.
|
|
|
|
07-13-2011, 06:22 PM
|
Re: wordpress not loading mySQL database
|
Posts: 45
Name: Noe Garcia
Location: The great state of TEXAS we'll kick yer ***!
|
ok and thank you for all your help
__________________
Please login or register to view this content. Registration is FREE |personal portfolio and blog
|
|
|
|
07-14-2011, 02:24 PM
|
Re: wordpress not loading mySQL database
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
One other thing you can try. Can you still log into the old WordPress install? If so you should be able to export your posts and comments. Look under tools > export.
You'll get an xml file that you could important into the new installation. You do need to be able to log into both installations of WordPress to make this happen and it may not transfer everything from the old install, though it should transfer posts and comments.
|
|
|
|
|
« Reply to wordpress not loading mySQL database
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|