Desperately need assistance with WordPress migration - wordpress

I've posted on the WordPress section of StackExchange and on the WordPress support forums but with no success and i'm coming under pressure from my client to get their site up and running.
I've tried without success to migrate my WP site to a different server and domain name. These are the steps I have undertaken as per the instructions and guides.
Downloaded the root folder of my WP site from the old domain
Exported my database from old domain
Created new database at new domain
Imported new database at new domain
Altered db name,username, password, and host in wp-config
Placed Search Replace DB v.2.1.0 in root folder
Uploaded WP folder to new server
All i'm getting is a blank screen.
What i would like to do now is ask is there any way that I can perform a fresh install of WordPress at the new server and simply copy and paste the required files and import my database from the site I was looking to migrate.
I'd really appreciate any help as I've hit a stumbling block which i can't get past on my own. Thanks.

If it's that important, you've probably got some sort of budget? WPTwin is an alright product, but if you're looking for a ROBUST migration deal, you can purchase Backup Buddy which is what I recommend.
About 3 weeks ago we had to move our large multisite (over 200 sites at the time, now at over 1,500) to a new server. We used Backup Buddy, and it worked Seamlessly!
We also use it to set up "white label" versions of our wordpress software, so basically cloning it, and moving it to a new server under a new domain name.
It's incredibly powerful and works flawlessly! We had only one issue with it ever, and that was that only once it didn't carry over Page Templates in some subdomains. OTher than that, boy I rate it 98%, it's a great plugin, although a tad pricey, but worth it!

I too had this issue a few weeks ago, and found that the issue was solved by changing the URL before moving the files. Plugins often are the root of issue when migrating so its important these are migrated carefully (preferably turned off when you move it).
Also, the blank screen probably means you have error reporting turned off in your php.ini. Make sure this is turned on and it should show you where you're going wrong.

I use the following procedure when migrating sites from my local dev environment, to a live environment.
1 - MySQL dump local db
2 - Open sql file in text editor. Do a find and replace on dev url updating with live url; eg http://site.loc -> http://livesite.com
3 - Create new live db, upload new SQL
4 - Upload clone of dev wordpress install
5 - Update live wp-config to reflect new db name, pw etc
6 - Check permissions on files and directories
7 - Make sure .htaccess is in place
8 - Open live site
That process never fails for me.

Related

Wordpress wants to install itself, rather than run the blog

We have created a duplicate of our website on a new server as part of a migration. We have a wordpress blog that is part of our website.
The docroot of the wordpress site is set as an alias in our main site. The result is that to access the site home page, the following url is used: https://www.rephunter.net/blog/.
The new environment is not available to the public at this time, and is only accessible within our VPN. When the above link to the blog is followed, instead of the expected home page of our blog, we get the page at https://www.rephunter.net/blog/wp-admin/install.php, which wants to install a new site.
The configuration in the new environment is supposedly an exact copy of our production site from some time back. The permissions on the main files is the same.
What is it that is causing the attempted blog access to be redirected to the installation script?
EDIT:
The responses so far have not really absorbed the intent of the previous information. We are not migrating in the normal sense. Rather we are testing in a new virtual environment that will eventually lead to a more normal migration.
We have an exact duplicate of our original wordpress and database environment that is running in a virtual environment with an updated protocol stack that is only accessible if you are on the VPN for that environment. As far as we can tell, there is no difference in the configuration.
For example, the parameters in wp-config.php are exactly the same as in the original installation. When php runs, it sees the same environment, with host names and everything identical. It would not work otherwise.
Yet if there really were no difference, it would just run. But since WP is trying to install a new database, there is something different that we are missing.
To further illustrate this: supposed you took an image backup of the wordpress installation and the database, and put it in a different VM, and set up the DNS and everything as it needs to be--the new environment looks no different than the old one. All databases, wp-config settings, etc, are the same. So our main website and database functions very similarly.
As I mentioned above, the difference in the protocol stack should be considered. The old system is on PHP 5.6.27--the new one is on 7.3.4. So that could be causing some difference, which maybe somebody might recognize. Wordpress is 5.2.2 and should be compatible with both PHP levels.
We believe there is some relatively simple parameter setting that we are missing. For example, as in the first answer that $table_prefix is set wrongly. But that is not it in this case.
WordPress redirects you to that installation screen because the database it's connecting to is working (meaning, the username and password are correct), but the data it's expecting to be there isn't. Therefore, it assumes it's a new / empty database and prompts you to install WordPress.
I've seen this happen in two scenarios:
The database really is empty, and thus WP needs to install the standard tables and info
The table prefix in your wp-config.php file is incorrect for an existing database
Look at your wp-config.php file in the root directory of WordPress, and look for a line similar to this:
$table_prefix = 'wp_';
Then, open up the database (phpMyAdmin or some other interface to browse what the database structure actually is) and confirm that the table prefixes (the first few characters of the table names) actually match what's set above.
Hopefully this gives you something to go on! Let us know what you find
Migrating Wordpress websites can be quite tricky. I've worked as a WP developer for a number of years and always struggled with manually migrating websites.
There are a number of factors to consider:
WP stores a lot of installation specific information within the database. So you can't do a database dump and upload the export into a new database.
Changing the website url within the wp_options table in the databased there are still other references to the original url scattered throughout the db.
You could try a find and replace all using an editor that supports this sort of functionality (vscode, sublime, atom) but things always end up breaking and your doing tons of "find & replace" actions.
I have always relied on a 3rd party tool Backup Buddy as it simplifies the entire backup and migration process and offers the peace of mind of having easily deployable backups for your website.
Backup Buddy allows you to export your website as a zip and then you can move the zip to any server you want and the plugin provides an installer script (php) to guide you through the migration of your wp site to any host and database of your choosing.
Note: I am not in any way affiliated with iThemes or Backup buddy, and I do not stand to benefit in anyway if you decide to use the plugin. This is only advice on a tool that I have found helpful, reliable, have had success with, and currently actively use on a number of websites that I maintain.
WordPress display installation page because you have not update your wp-config.php file after migrating server so please follow below steps in future when you migrate your website.
Please follow this steps when you migrate your WordPress website from one server to another server.
Back up your website files/database
Export wordpress database.
Create database on your new host server.
Edit the wp-config.php File and edit this details.
Add new database name
Add new database username
Add new database user Password
Add new host as per your hosting provider or (localhost is default)
Import your database to new server.
upload the WordPress files to your new host
defining new domain URL & Search/Replace old domain URL

Migrating site to wordpress

A client asked me to migrate a website to wordpress. The theme is made, everything is working fine locally and now im thinking the best way to make the migration. I'm thinking on makeing the instalation on a subfolder for testing and then moving it to the root of the server. Is there anything i need to do other than copy the files from wordpress folder to the root? Anyone know a good tutorial or a better way to make the migration?
Take a look at this tutorial from Sitepoint I'm always referring to it when I want to move WP websites and it works.
Example: yourlocalwebsite.com
Example: yourlivewebsite.com
Step 1 Upload you all local files or WordPress setup to the live server.
Step 2 Export your localhost database and edit it with notpad++ editor.
Step 3 find your local website name into notpad++ something yourlocalwebsite.com then go to replace tab and all replace tab your yourlocalwebsite.com with yourlivewebsite.com. now save it.
Step 4 check database name username and password into wp-config.php it should be correct which one you using live server database.
Step 5 go to you live database and take backup it then removes it and then imports your local database now.
Step 6 for making sure go to wp_options table and check the URL it should be now yourlivewebsite.com if not then change it
Step 7 go to wp-admin and set the permalinks to the post name
and check it is working fine or not.
local site comes properly but when we deploy same folder on server ... it shows broken pages
In order to migrate a Wordpress website you should
1. Copy your www folder using FTP Client (FileZilla, Fire FTP or WinSCP).
2. Export you database (important!) and then import the database in your new Web Hosting (Like OVH or other..).
Let me know if you have any others question !
Yes, you have to do lot more things than you specified.
Follow below steps :-
Download "Wp Migrate DB" plugin from https://wordpress.org/plugins/wp-migrate-db/ to your existing site
Open db migrator. When you will try migrating, it will prompt you to give folder path and website url for new site(old site is already filled by plugin so don't change them)
After adding folder path and URL start db migration
Copy files and folders from your local to live
Import migrated db to new database
Copy new credentials for db connect to wp-config file
Re save permalinks, as it may won't work after migration
After this you are all set to go...
Let me know if you need further assistance.
followed this tutorial and worked like a charm. Wordpress installation moved to the root of the server and everythig works fine. Themes and plugins. Just made the test right now.
http://www.inmotionhosting.com/support/edu/wordpress/329-move-folders
Thanks for the answers.

How to change the domain only without migrating the files

I have two business domains, for example, domain.com and dev.domain.com.
Since I had to keep the old website for running the business while developing website, I keep the old website to domain.com and bought the new theme, installed, and developed in dev.domain.com.
After finished the development, I wanted to use the domain.com instead of dev.domain.com, but when I migrate all the file, all the plug-ins were not working because of license reason.
Since I don't want to develop entire website again, I just made domain.com to forwarding to dev.domain.com.
Is there way I can change domain to domain.com?
Thanks,
Not entirely sure but you're probably getting errors because WordPress saves the site URL in the database so after you move the files to domain.com, the database is still requesting stuff from dev.domain.com. Changing the one table in the database (site_url under wp_options) is sometimes enough but if you've been developing a site I'm guessing you've got a bunch of links and images set up with the dev.domain.com URL. What I usually do when migrating a dev site to live is...
Set up a new Database and User/Pass for the new live site.
Export the database from the dev site.
Open the database in Notepad++
Use Find and Replace (ctr+h) to find dev.domain.com and replace with
domain.com, choosing Replace All.
Now import this database to the new database you set up earlier, and
change the wp-config.php database settings to the new database.
Be sure to keep copies of the backup before you edit the database in case anything goes wrong, but you should be good. This is how I do it all the time.
https://codex.wordpress.org/Moving_WordPress#If_You_Have_Accidentally_Changed_your_WordPress_Site_URL.
This https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ is probably a better method than trying to load your entire db into a single text file is not the most viable option.

How to push wordpress from mamp into hostgator

I have done a blog in mamp and would like to push into hostgator. Must i recreate everything in hostgator like Installing Wordpress on Hostgator. Is there any way i could just push my stuff straight into hostgator without redoing everything in hostgator. Need some suggestion.. Thanks..
It's quite easy to deploy a local version of Wordpress to a live server. First of all, you are right, I would not bother installing a clean copy of Wordpress on your server, you'd then have to totally rebuild the site.
What you need to do is;
FTP all your files from your local machine to the server.
Transfer the whole database from local phpmyadmin to a new database on the server
Change the database connection details in wp-config.php
Make any necessary changes to your default Wordpress .htaccess. What I mean here is that your MAMP site probably isn't in the root but your live site probably will be. If you have SEO permalinks set up then you would remove the Mamp subdirectory from the rewrite rule and the base in the .htaccess. Your host might also require you to add rules here (ie specifying which version of PHP to use etc). You could always install Wordpress using their installer to see if they add any special rules themselves.
All easy so far - now comes my tip. Moving Wordpress databases from your local development environment to live can be a massive pain because Wordpress (and lots of plugin/theme developers) use serialized arrays to store data. So if you do a find-and-replace on the database to replace your old url with the new one, you will disable lots of things like config settings and widgets (text widgets specifically, but there's loads of stuff you end up having to recreate).
Download this file;
http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
and upload it to the server and access it directly in your browser. Run through the quick form and perform a serialized array-friendly find and replace on your database urls. Job done. Good luck.

Moving Wordpress with Headway to a new domain breaks the site

I have a client's wordpress site that is built using Wordpress and Headway. I need to move it to a new domain on a new shared server ( same host provider with the same hardware configuration ).
I've moved many wordpress setups like this before, including Wordpress / Headway combos. I've also, during debug, used Headway's documentation and videos to double check that I'm doing everything correctly.
I moved the database over and replaced all occurrences of the old domain with the new domain, and updated all filepaths. Then I copied the public_html folder to the new server. The site should be working at this point.
Instead I get the Headway error message No Content to Display on an otherwise empty html page. I've traced the problem to the wp-config table where Headway stores serialized data for it's blocks. I can update data throughout the database to the new domain everywhere except in these Headway entries in the wp-config table. As soon as I update those, the site starts to fall apart all over the place, and if I update them all, the site loads the Headway error message No Content to Display. The underlying Wordpress system seems to still be working as I can load the /wp-admin console and all my content exists and looks correct.
If I trace the problem deeper, it appears that the Wordpress function get_options() is failing in the Headway file data-layout-options.php. I have been unable to debug any further.
The site works perfectly on the original domain, and, in theory, I'm doing a direct copy of all data and then simply replacing the old domain with the new domain.
Can anyone help with a similar problem? It feels like I'm chasing a bug in the code when really it's some sort of simple oversight or config setting that has been munged. Please help!!!
I was indeed close to the problem.
The serialized Headway data in the Wordpress wp-config table contains string lengths. Migrating the database oneself, and then grepping and replacing the old domain with the new domain and old web folder file path with the new web folder file path causes unserialization to fail in the Wordpress system ( eg. the get_options() Wordpress function ).
Instead of writing a custom script to deal with the string lengths, I tested a few database migration plugins. WP Migrate DB was the winner and solved the problem.
Migrating the Database
Install the plugin on the original domain ( original Wordpress install ). It will ask you to input the new domain and the new file path of your web directory ( the web directory file path is very important as well ). In my case, for example, the file path of the web directory had changed from /home2/old_username to /home6/new_username.
The plugin will then dump the entire Wordpress Database and replace all occurances of the old domain and old file path with the new domain and file path of the web directory. The .sql dump will then save locally on your computer.
This was not perfect however, and I still needed to do a few of my own grep and replaces. Additionally, I had to be careful about this because a few of the ones that were missed were in the Headway serialized data and I had to do MySQL queries to make sure I updated the string length properly.
These few updates were missed because some of the database entries had http://www.olddomain.com and some had http://olddomain.com. The plugin did not catch it all, but made it manageable to replace by hand.
Finally, I had to import this updated .sql dump into an empty Wordpress database on the new domain.
Moral of the story is that Headway V3 is not simple to migrate to a new domain. You must be very meticulous.
Another option, that I did not try because it costs >$75 was BackupBuddy. It's likely that BackupBuddy will still miss some domain and file path updates, so be careful.
I have found the solution of T. Brian Jones and have just applied it for WordPress 3.8.1 with HEADWAY 3.6.2.
All works fine.
One trick for newbes like me: if you don't know the file path on the server where you are moving your database, before you do database dump install WP Migrate DB on this server, run the plugin (Tools) and get the path from there...
Thank's TBJ
Maciej

Resources