I removed all tables from my WP database and imported .sql file from another exported database. When I access website it started installing WordPress and after installation none of my imported post are visible. What I have done wrong?
There are few things to consider when moving databases from one site to another..
check wp_config file so it uses the correct information
once database in imported, ensure your siteurl and home option_name entries point to the correct address in wp_options table
permanalinks are updated
you have all plugin/theme files in place
Related
Seen some other questions regarding this but not sure what I am doing wrong. Here is what I've done:
downloaded and unzipped a fresh install of wordpress to /Sites/wordpress
Started MAMP and set document root to above
Opened up phpmyadmin and created a new database named the same as the database I want to import. (I figured I did not need to change the url's in the older database because they will be the same on my computer? 'localhost/mysite')
Imported localhost1 database to newly created database
I know that user and password created are root, but I created an additional user and password to mimic what was in the wp-config of the original site (localhost1). I also changed localhost2's wp-config DB name, user, password to match that of localhost1 so that they are the same.
From this point I try and go to http://localhost:8888 or localhost/mysite but I basically get a 'This webpage is not available' screen as if I'm not online.
Any ideas?
This might have to do with variants serialized in the database even if the URL paths stay the same. Try taking the localhost1 database and migrating to localhost2 after using a serialization tool like this.
I realize you are not changing URL paths, however I've read that tables are all serialized so it's worth a try.
The problem in my opinion is not in the database, because WP will tell you if it is.
Problem must be in your local server configuration. In Windows I made different folder for different projects and access them like localhost/project1, localhost/project2 etc.
I don't know how are things in Mac, but must be the same. So try to start a fresh copy of WP in your new localhost, and then import database from first project.
When WP first starts creates .htaccess file with modrewrite, so you can also check current .htaccess file and rules there.
We have a site that was a development version at test.mydomain.com. I migrated it to www.mydomain.com. I exported the existing database, created a new one, imported, then changed the wp_config file to point to the new DB and changed siteurl and homeurl values. However, in wp_options (phpmyadmin) the values for siteurl and home continue to be test.mydomain.com. I can log into the Wordpress admin on mydomain.com but it's searching for post data in test.mydomain.com and not populating the posts in the editor.
Try deleting the .htaccess file then go to the permalinks page change to another permalink that is not selected this should force a .htaccess file to be created then you can change back. This might not work but as you have changed your database settings in the mysql I don't see why it will look at the old site url/database.
Install adminer plugin for wordpress this will let you change the database from the plugin and will allow for changing of the fields that did not change to point to my domain.com ..
Memcached (specifically object-cache.php in wp-content) is most likely at fault, just de-activate it
I'm unable to restore my site database and need help figuring out why. The Wordpress site is on my local computer.
Here's what I did:
• Exported the backup file in a zip format
• Made updates to plugins through Wordpress platform
• Site crashed from bad update; tried to delete that plugin and made things worse
• Decided to restore backup; tried importing through phpmyadmin; came back with errors
• Dropped all the tables from that database
• Unzipped by backup file; commented out "create database" line
• Tried importing again and came up with the following errors:
#1007 - Can't create database 'Wordpress'; database exists
I've built several websites locally in the past so yes, there's already another database called Wordpress. I'm not sure how to delete them besides dropping the tables.
I'm losing hope that I'll ever be able to restore this site.
Any insight?
To import your database,
open it with your text editor like NotePad++
locate (should be at the beginning of the file) and erase the line:
"CREATE DATABASE yourdbname"
Save it
Now try to import it again
Also, it seems like you have only one database called Wordpress and you're using it for all your websites, right? You should make a unique name, for each database/site you create. You can still do that for your current site and create a new database, import your tables, and edit your wp-config.php file to communicate with the new database.
I have a joomla 2.5 site created locally on my machine, that I've migrated to a vps running nginx, php and mysql. Here is what i did in order:
1. Uploaded all the joomla files in the public_html
2. Changed all the files permission to 644 and all the folders to 755
3. Imported the database.sql to mysql using these commands:
--> mysql> create database databasename;
--> mysql> GRANT ALL PRIVILEGES ON
databasename.* TO username#localhost IDENTIFIED BY 'password';
--> mysql> flush privileges;
--> mysql> exit
--> user#vps:~$ mysql -p -u username database_name < file.sql
I can see all my tables inside the database already, and changed all the needed information on my joomla configuration.php but when i open my site, i get this error:
Table 'databasename.s1t3j0s_session' doesn't exist SQL=INSERT INTO `s1t3j0s_session` (`session_id`, `client_id`, `time`) VALUES ('rh249ehb2tbsqkdff34v177d76', 0, '1357339991')
Where did i got it wrong?
I have migrated wordpress site to the same server with no error.
I've been having trouble with it for weeks. What I needed was a backup copy on my system. However, when I uploaded the database from the remote server onyto my localhost I was getting error messages relating to the session table not existing (the same error that you are getting).
I tried all of the tips relating to deleting and re-creating the tables, but this did not work.
The only solution which worked 100% - which I finally discovered today, was to re-install Joomla 2.5 (I used a fresh install), and then do the following:
Instead of uploading the database from site containing the correct content, instead go through the SQL file itself (i.e. the one you will have exported for upload before encountering problems), and manually process each one of the insert statements into your SQL console directly (I'm using PHPMyadmin). In other words, don't attempt to import the whole file as you normally would. To do this will just result in errors.
For some reason, Joomla 2.5 has an issue with tables that are already populated with data being replaced by a dump file or replacement, sometimes duplicate, data. Hence the need for a fresh install....
Before processing each of the install statements individually (this can take a while - it took me about an hour and a half), go through each of the Joomla tables and make sure that NONE of them are populated with any data whatsoever (therefore when you process the install statements they will not be replacing existing data - because you will have removed all data from populated tables).
So long as you make sure that no INSERTED data has been added to the tables prior to the migration, this will solve your problem.
So to summise:
1/ Get a fresh J2.5 install.
2/ Delete all popolated table data from every joomla table.
3/ Copy and paste each of the insert statements from the exported mysql file containing the correct data. Process each statement individually (this is optional, but highly recommended: to do it this way enables you to counter and pinpoint any individual errors if and when they occur - without having to look through the entire mysql file)
...Go to your site: bingo - it should work!
Make sure the value of $dbprefix in configuration.php under the Joomla directory has the correct value by checking it against the actual db prefix used (open phpMyAdmin and choose the Joomla database to check for this).
Just truncate the data in the session table and do the process again. You have nothing to worry about truncating because there are no valuable data. Session table sometimes messes up stuff.
On Unix, table names are case sensitive. On Windows, they are not. Fun, isn't it? Kinda like their respective file systems. Do you think it's a coincidence?
Caveat: it probably depends on table type; MyISAM.
Field names are case-insensitive regardless.
I had this problem,
in my case, I imported the database through the cpanel and later on got this error message. I later found out that importing database through the cpanel didnot import the tables, just the database name. So I went to the phpmyadmin and import the database there once again, and solved.
I have followed the directions, created a control user and database, ran the create_tables.sql script (after I modified it with the proper DB name), used the setup script to create a config file and filled out all the fields on the "Edit Server -> Configuration Storage" page. I moved the generated config file into the top level PMA directory.
I can use PMA fine, but the Configuration Storage features aren't working. The foreign key fields aren't hyperlinking to their respective entities in different fields. I've checked the configuration tables (pma_*), and they're all empty except for pma_recent, which has two entries (login attempts or something?).
I should note that I built the DB before installing phpMyAdmin, so is there some script or something I have to run for it to scan the current tables and find the foreign keys/links?
Thanks!
I always had the same problem. I could never get the pma configuration database to work. SQL history neither.
Now phpMyAdmin has browser storage, which luckily works. Except it's nagging me on every refresh [or new tab] to load the configuration from the browser storage.
I just rely on the php config, and put everything in there.
Configurations of phpMyAdmin is in the file config.inc.php and you can take a look on this file config.sample.inc.php
This solved the problem for me $cfg['QueryHistoryDB'] = true;
Thanks to http://sourceforge.net/p/phpmyadmin/bugs/3998/