How to move Wordpress to another domain without the chance to make a proper backup first? - wordpress

So my webhoster closed down, where I hosted my Wordpress blog. I was able to receive a zip file containing all my data. I now have a new webhoster and I extracted the zip file to its root directory.
Trying to open my website now gives me "Error establishing database connection". The web tells me it may be related to hardcoded urls in the Wordpress database, which I need to replace by the new url.
However the tutorials usually tell you to use the Wordpress interface to create a backup of my database first, which can then be edited in tools like phpmyadmin. I can not access the Wordpress interface anymore and so far did not manage to edit the database otherwise.
I tried placing a local copy of the blog in the "C:\xampp\htdocs" folder, hoping phpmyadmin would recognize the database and allow me to edit it. Not working, maybe I am doing something wrong?
Any ideas to revive my Wordpress blog?
Cheers

Okay I think I got it working. For people having the same issue:
I loaded the database locally by copying the *.myd, *.myi, *.frm files to a new folder in my local xampp installation (e.g. C:\xampp\mysql\data\myDatabase).
I then used phpmyadmin to export this database to a .sql file.
On my webserver I then installed a fresh wordpress blog. It might be enough to copy your existing wordpress stuff, without needing to do this step afterwards, not sure.
My webhost has phpmyadmin preinstalled, so I used that to delete the fresh wordpress databases and import the .sql file instead. Now everything is in place, but since I changed my domain I need to change the URL paths in the database.
I used this script (use it by placing it on your webserver in the wordpress root folder and calling it in the browser) to do a search&replace of my old url to the new url: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
After that I only had to manually fix the path to my header image that I had edited in the past in the theme's header.php file.
Phew. Thanks for your help f00644.

Related

Migrating Live/production WordPress site to Laragon

I'm trying to set up my Live WordPress site into a local environment, Laragon. I have tried using a plugin call WPvivid, but it does not seem to be working correctly. So, that leaves me with 1) use another plugin or 2) manually move the site over, I would like to learn the latter. I understand how to move the Database over and edit the config file to connect to the server. The problem is when I move the WP-content file over to the local WordPress site noting is happening, I have no content available to me.
Thanks for the help!
What you need to do is
Quick create -> wordpress
access the local url you made
select the language (wordpress set up)
before setting up the id and password of wordpress (do not save the info), find your new local wordpress folder.
copy and paste the original "wp-content" file you had (the file of live wordpress site) to change the local wp-content file.
copy and paste the original "sql" file you had (the file of live wordpress site) to change the local wp-content file. To do that, access to yoururl/phpmyadmin, and change import the sql file you had.
after that, finish the 3rd process.
It would be easy if you find a great video of explaining this procedure.

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.

wordpress database not showing in PhpMyAdmin

I am new to wordpress and have bought udesign theme from themeforest. from my Plesk I have installed WP and then from the dashboard of WP tried to upload the theme, but failed. hence went directly to dedicated server and hosted on the root folder.
Theme started reflecting on the dashboard and I have started customization. Once site completes I need to move the site to production server. When I check PhpMyAdmin from the plesk, it shows there is no DB table. how do I copy/move the site without DB?
Can i manage site without PhpMyAdmin? like copying the entire assets to new server and it starts working automatically?
Please help me to find DB or Let me know how to work with the themes to make sure everything in right place.
Many Thanks,
Gururaj
If you’ve ever had the need to find the name of your WordPress database, then there’s an easy way to do that – simply look for it in your wp-config.php file located in the root folder of your WordPress install.
Accessing Your WP-Config.php File
If you are doing something where you need the name of your database, then I’m assuming you have access to your server.
Simply go to the main folder of your WordPress install and locate the file called wp-config.php.
Edit file and find name in:
define('db_name','your database here');

wordpress website transfer from one machine to another

I installed wamp and wordpress locally. My friend also installed wamp and wordpress locally and started working on a website. I want him to send me what he finished so I can continue working on it. So he sent me his www folder inside wamp installation folder and I paste it inside my www folder. But when I open the website in browser it is empty (default one with Hello word). What should he send me, so I can continue working on the website?
If it's a wordpress website, it's not as easy as copy-paste; but it's not too difficult.
After they have given you all the physical files, your friend should
1) export their database (the name starts with wp_) using phpMyAdmin, and you should
2) import it with phpMyAdmin [note: if you want to overwrite your wordpress database, do this: 2a) as a backup, export your database with phpMyAdmin; and 2b) select all tables in your database and 'drop' them. Now the database is empty and you can import your friend's inside it.]
When this is done, you should
3) use phpMyAdmin to edit the first two entries in the table wp_options, inserting the proper path to your local website; then you should
4) assign to this database the username-password combination present in the wp-config.php file, in the main folder of wordpress. You do this with phpMyAdmin. Alternatively, you can edit wp-config.php so that it carries the proper password-username combination for your system.
IF there is nothing of interest in your friend's database (as posts, pages, themes or plugins settings that you need etc) then you can skip steps 1,2 and 3.
This should do it. :)
The content of your WordPress installation is stored in a mySQL database, not on the file system. The files your friend sent you is WordPress itself and doesn't change anything contentwise.
Your friend needs to export (dump) his database to a SQL file. This can be done with a tool like PhpMyAdmin or mySQL Workbench. Take this file and import (overwrite) your local database with it. Better make a backup of your database before!

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