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
Related
I've got a live site, which I downloaded in order to be able to customize it more precisely by editing the code. I followed the steps of this tutorial.
What I've done so far:
Downloaded the files of my site.
Downloaded its database.
Created a new database (with the same name that is included in wp-config file).
Imported the downloaded database into the newly created one.
Edited the two entries according to step 5 in the tutorial and of course, added a new user with global privileges.
Edited the hosts file to have a custom domain.
Restarted Apache & MySQL (I use XAMPP).
Now it is still displaying the same error message, that a database connection could not be established.
There is "localhost" set up, but I am not able to use it, I can only connect to my offline sites by using 127.0.0.1.
I'd really appreciate your help.
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.
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
I'm trying to move a wordpress site to a new database on a new server, because the old host is no longer running. I have a new database on the new server, new name, username, pw, etc. and changed all that info in the wp-config.php file. I don't want to change the url. But when I type that url into the browser, its asking me to do an install of wordpress all over again. Is this right?
Use phpmyadmin on the new host to check the table prefixes of the imported database. The "new install" issue means wp-config.php isn't reading the correct database tables. Or, open the database dump and check the database table prefix.
And, of course, be sure your database name, user and password are all correct in the new wp-config.php.
If you are not changing the domain, there is no need to change URLs in the database. If you do change domains, use http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to correctly change URLs in plain and serialized data.
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/