Free and Premium WordPress Plugins & Themes Forums WordPress Themes Creatista Import sample data from sql file: error
- This topic has 4 replies, 3 voices, and was last updated 1 year, 5 months ago by Alex Cage.
- AuthorPosts
- June 13, 2020 at 6:23 am #966261Donn PattendenParticipant
Initial installation is easy, but without the sample data it’s just a generic site. It’s very technical for a theme aimed at creatives.
I’ve followed the instructions from the PDF, but get the error below when importing the edited creatista.sql file.
Error
SQL query:—
— Database:motopress_themes
—— ——————————————————–
—
— Table structure for table$table_prefix = 'zxd_';commentmeta
—DROP TABLE IF EXISTS
$table_prefix = 'zxd_';commentmeta
MySQL said: Documentation#1046 – No database selected
Instructions from the PDF are as follows:
Import sample data from sql file
1. First, you need to upload media files to your server. For this try to connect to your server (where WordPress is installed) using any FTP client (e.g. Filezilla, Cyberduck, Transmit) or File Manager – service on your hosting control panel. Then navigate to your site root folder/wp-content/ and upload directory from manual_install that is called /uploads
2. After that you should find creatista.sql file in the package with sample data and open it with file editor like Notepad++, Coda, Atom, etc. and use ‘Search and Replace’ option.
Find: your_website_url_here
Replace with: https://your-site.com (add your website URL address without a trailing slash) Click Replace all and save changes.
Note: By default WordPress table prefix is wp_. If there is custom table prefix in your database, you need to replace it in SQL file, too. You can find your WordPress table prefix in wp-config.php file at the site root folder on the server. In the example below you can see custom table prefix mp_
Example: $table_prefix = ‘mp_’;
So once you found your table prefix, copy it and open creatista.sql file with file editor and use ‘Find and Replace’ option again:Find: wp_
Replace with: custom_table_prefix_ (note there is underscore _ at the end) Click Replace all
After that:
Find: _custom_table_prefix (note there is underscore _ at the beginning) Replace with: _wp
Click Replace all
Save the changes and proceed to the next step.
3. Connect to PhpMyAdmin tool – usually it can be found in your hosting account or cPanel. Once you are in PhpMyAdmin interface, you should click on the database name in the left sidebar and find Import tab at the top. Click Import and upload the edited creatista.sql file. After the message about successful import you can go and check your site.June 15, 2020 at 7:24 am #966835Andre FloresModeratorHello, Donn!
The #1046 – No database selected error means that you have not selected the actual database to import the .sql file to.
Once you are logged in your phpMyAdmin tool, you should click on the database name at the left hand side first – you will get all your website current database tables displayed on the screen – and then click “Import” tab, upload .sql file and import it. The main idea is to select the database before importing .sql file.Regards,
AndreJune 15, 2020 at 9:02 am #966878Donn PattendenParticipantThanks Andre,
I imported the file and got this error:
Error
MySQL said: Documentation#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘zxd_’;inactive_widgets\”;a:0:{}s:9:\”sidebar-1\”;a:6:{i:0;s:8:\”search-2\”;i:1;s’ at line 100
June 16, 2020 at 7:03 am #967349Andre FloresModeratorHello, Donn!
Kindly check what your database table prefix is (standard prefix is wp_, you may find it in wp-config.php file in the root of your WordPress installation). If it is different than wp_, you will need to replace all the wp_ instances in .sql file with your own prefix and import it once again.
I would also recommend that you try copying all the code from .sql file, pasting it to the SQL tab in phpMyAdmin and clicking “Go” button, instead of importing the file itself.
If you still face issues with importing .sql file, do not hesitate to submit a request to our Help Desk providing all the necessary access credentials, so we take a closer look at the issue.Regards,
AndreJuly 14, 2023 at 1:46 am #1479035Alex CageParticipantHello,
For anyone interested in a more general approach to populating their blog with sample data, here is our overview of the main options.
Regards, Alex.
- AuthorPosts
- You must be logged in to reply to this topic.