Moving Wordpress site to new server same URL - mysql

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.

Related

How Do I Restore WP site from unzipped files and SQL dump?

I have a site I am supposed to migrate. The previous developer did not give me access to the Wordpress backend or a Wordpress back up file. I do, however, have access to FTP for the site. I've downloaded all of the site files including Wordpress, plugins, the theme, and I have a SQL dump file of the database. How can I restore the site (at another location) with these elements?
Assuming you have the previous site's root in tact, meaning you extracted ALL the files, and not just wp-content (if you only did this, you should just download everything from the previous root).
1) Upload zipped file to new root directory
2) Unzip the file
3) Create new database and database user
4) Import SQL dump to new database
5) In wp-config file, adjust settings to point to new database
6) In database, change primary site URL to the new site domain (may be multiple instances so do search/replace)
7) In database, create a WP user so you can log in to Wordpress backend
8) Remove original zip file from root
Assuming you have access to the database you can use a MD5 hash generator to change the password of the admin user then use a duplicator package plugin to copy and migrate the site wherever you need to.

Issues with Wordpress database from localhost1 to localhost2

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.

Wordpress querying wrong database

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

Ezpublish create new Mysql database after the old Mysql database got deleted

Recently I setup a website on byethost.com using the CMS ezpublish. After a couple days of working on the site, byethost deleted the Mysql database. I still have all the FTP files but I can't log in as an admin because their is not Mysql database with all the users. Is there any way I can create a new Mysql database setup for Ezpublish. All I need currently is an admin account and whatever other information is essential to have for Ezpublish to run. Any response/ideas would be great.
Just create a new database
Then, for a plain site (not ezflow neither ezwebin) import those files : kernel/sql/mysql/kernel_schema.sql and kernel/sql/common/cleandata.sql in MySQL.
The admin username will be : admin and the admin password will be : publish
By the way, an other solution is to edit settings/override/site.ini.append.php and change this:
[SiteAccessSettings]
CheckValidity=false
to this:
[SiteAccessSettings]
CheckValidity=true
Reloading a page will lead to launch the setup wizard just like if it was a fresh install. (If it doesn't work, you may need to clear the cache by yourself and try again)

Installing phpmyadmin to be able to manage the mysql database the admin created for me

I dont have access to cPanel. I only can access the root of the site I am working on using FTP, with the domain name, user and password. I want to install phpmyadmin on the root so that I can manage the mysql database the admin created for me. I have the db name, user and password. What do I need to do? Do I need to download phpmyadmin, upload install it? Please give me some details and howto.
Will I actually be able to use it for such?
Also, how to migrate all contents of another mysql databse that I have also access to (having its: db name, user and password) to this one, that was created for the site I am working with.
Download phpmyadmin from the following site: http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.8.1/phpMyAdmin-3.5.8.1-all-languages.zip/download#!md5!a65d444787645735c75bca49cdb558cb
Upload it in a seperate folder on your webserver via FTP
Go to this folder and login with your database username and password
Correct the warnings and error on the bottom of the screen
(mostly security issues)
done :)
When you have any questions with errors or warnings please post a new question.