Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

RESTORE WORDPRESS SITE DATABASE?

Joined
Jun 15, 2005
Posts
7,515
Reaction score
56
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 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
 
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
 
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
 
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
 
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
 
Top Bottom