Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

RESTORE WORDPRESS SITE DATABASE?

SF

Joined
Jun 15, 2005
Posts
7,525
Reaction score
55
Hi Guys,

For some reason I have removed a database from one of my word press websites but luckily I had a back up but struggling to think how to restore it back?

Any help appreciated.

Thanks,
Sean

Fasthosts said it was a 5 min job if you know what you are doing
 
Hi. yes you need to upload your backup database (You will probably use phpmyadmin) and set permissions. Then update wp-config.php with the new details
 
Hi Yes thats exactly what they said, I have all the details from the wp-config.php and ofcourse the database, they also advised me to create a new database using the same details from the config file, I have tried a few times but i must be getting something wrong
 
If you go to phpmyadmin, there is an "import" option
 
Hi Sean,


So create a new database with the same details and upload the file via phpmyadmin

thats what fasthosts just said I didnt use same details and it seemed to broke it so I deleted the database and i will attempt another go
 
thats what fasthosts just said I didnt use same details and it seemed to broke it so I deleted the database and i will attempt another go

If you changed the details then just update wp-config.php to the new details
 
ive gone to create a new databse using the database name from the config file and it says its already in use?
 
I am getting this error when trying to upload the back up database

Error
SQL query:

--
-- Database: `ocidb_xSYB143342`
--
-- --------------------------------------------------------
--
-- Table structure for table `qn1j_booking`
--
CREATE TABLE IF NOT EXISTS `qn1j_booking` (

`booking_id` bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
`sync_gid` varchar( 200 ) NOT NULL DEFAULT '',
`is_new` bigint( 10 ) NOT NULL DEFAULT '1',
`status` varchar( 200 ) NOT NULL DEFAULT '',
`sort_date` datetime DEFAULT NULL ,
`modification_date` datetime DEFAULT NULL ,
`form` text,
`booking_type` bigint( 10 ) NOT NULL DEFAULT '1',
PRIMARY KEY ( `booking_id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =18;

MySQL said:

#1046 - No database selected
 
Did you newly create or is there a database called ocidb_xSYB143342 ? in the database list on the left had side.

If so click into the database first then import
 
Hiya this is the database name associated with the domain and hosting ocidb_xSYB143342 this is also the database name in config file aswell but the back up file is this 213_171_200_78.sql
 
lazarus, I just did as you said by clicking in the database this time and importing and it now says

Import has been successfully finished, 68 queries executed. (213_171_200_78.zip)
 
That's a good sign. You should now be seeing the imported tables listed in that database, Just make sure everything matches up with your wp config file and it should be working
 
I am still getting
Error establishing a database connection
when i visit the website i am just getting that above
 
When you created the database in phpmyadmin did you also create a user for that database ? Sometimes there is an option to automatically create a user when creating a database.
 
I am still getting
Error establishing a database connection
when i visit the website i am just getting that above

check the database USERNAME and password match Aswell as the database name and password
 
Yes it shows me a user in phpmyadmin under status i cant find priveliges?
 
yes sorry just found the user its quite long
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Featured Services

Auctions Ending - Flip.uk

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Register for the auction

Latest Comments

Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom