![]() |
I need help with an .sql file because I am basically going crazy.
If anyone can help it would be appreciated.
Basically I used to own a wordpress site back in 2013/2014. I ended up letting the domain expire but I still have the backup and .sql file. Anyway, I thought I would try and get it back up and running on a new domain. I installed wordpress on the new domain and I have been trying all day to get this stupid .sql file from 2014 to upload. I am trying to do it through cPanel/ mySQL but each time there is some error or other. I then need to Google the error and a fix and try and make the change. I also tried editing the SQL file directly but I am just getting myself confused. So, please if anyone knows how to get this installed help me out. Please. |
Perhaps your php install is limited to file uploads that are smaller than the size of your file?
|
Quote:
I get things like this: ERROR 1231 (42000): Variable ‘time_zone’ can’t be set to the value of ‘NULL’ and ERROR 1231 (42000): Variable ‘sql_mode’ can’t be set to the value of ‘NULL’ |
40101 set sql_mode=@old_sql_mode
|
I have decided to start again. I will post every step and errors. if anyone knows they can jump in.
So just uploaded the old .Sql file and I get the error: Code:
-- |
Quote:
Code:
USE database_name; |
For some reason this time I have a success message: Import has been successfully finished, 493 queries executed.
However, I can't see the posts. |
Did you install WordPress first and then tried to import the sql in existing database?
It's better to create database first and then upload WordPress, it will make necessary databse upgrades. Also could be that custom posts taxonomy were used if you don't see the posts in your wordpress dashboard |
Ok, so in mySQL they were on page 2. I can now see the imported posts however they are not visible on the website frontend or backend.
The SQL database now has two post entries: 1. swxl76ygp2d_posts (the newly created posts) 2. wp_posts (my original old posts.. There are loads of these swxl76ygp2d which I presume replaces the original entries. Can I delete them? |
Quote:
i have the old .sql file. If I delete the wordpress install. How would I get it to use a specific sql file rather than generating it's own? |
Quote:
So, create a new database from within Cpanel and then edit the wordpress wp-config file to point to the new DB? Makes sense. |
Quote:
Make backups! Worst case - hire someone to do it for you, plenty people who would do it for a fair price. Hope it helps! |
- SSH into the server, edit my.cnf or server.cnf (mysql config file).
- set the following: sql_mode= just like that, no value. - Restart mysqld - Run the following command mysql -u USERNAME -p DATABASENAME < file.sql it will prompt you for password. Enter the password. |
Quote:
|
Ok, so I thought I would sort it this time.
this is what i did. Created a new database and user. Added user to database. Saved config details. Went to FTP and edited the config file. went back to my domain and it started the install. thought it was going to work but no, it's exactly the same. The files show in mySQL but not front or backend on the website. Even if I did use a custom posts taxonomy surely the posts/ pages would show in wp-admin? |
Are you sure your table prefixes are the same?
Looks like you have prefix wp_afflctable while the standard prefix is wp_ you can change the prefix in your wordpress configuration file in the line $table_prefix = 'wp_'; |
nevermind wp_afflctable seems to be a plugin table, still cant hurt to check if table prefixes match
|
what you can try is some plugins like wp migrate db to import the sql and see if you can retrieve the posts that way
|
Quote:
|
Ohh, Congrats! Really glad you've got it! Must have been relief! And this makes perfect tutorial for archives.
|
Quote:
|
All times are GMT -7. The time now is 04:11 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc