Moving WordPress from localhost to a live server - wordpress

Have successfully moved my WordPress website from my localhost to a live server but the images are not showing and some pages as well. Some pages are still showing the localhost URL while another error message am getting is "That page can't be found".
I already changed my siteurl and Home column in my database table (wp_option) to the live server, but still the images are not showing yet. What should I do?

You have to replace all localhost url in your database.
You should follow the steps below to move your database from local to live server:
Export your database to sql file
Use notepad++ open that sql file
Replace all localhost url to your live domain and save the file
Import the saved file to the live database
Note: make sure that you uploaded all the images to the live server

I would definitely recommend to use an automated plugin for the task. The one I use is Duplicator, by LifeInTheGrid. It is free and works perfectly to move a site from development to production and viceversa. Here is the link to it:
https://wordpress.org/plugins/duplicator/
I use it with all my sites and so far it has worked flawlessly.

I finally discovered a wonderful plugin that did it all.
The plugin is called Velvet Blues Update URLs .
Just Download the package. Extract it to the "plugins" folder of your WordPress directory. In the Admin Panel, go to "Plugins" and activate it.
Go to Tools -> Update URLs to use it and then tick all the boxes to replace the old URLs with the new URLs.

Related

Images not showing on Wordpress website after migrating to hosting provider

I recently migrated my website to a hosting provider from localhost and some of the "Featured Images" on the some pages are not showing up. I went to the Chrome Console on the computer that was having this problem and saw this error:
I see that Wordpress is trying to load the image from Localhost instead of the website. My siteurl and home options are set correctly. I have already tried deleting all the plugins but that didn't help. I also tried recreating the page on the server itself and it did not help. Can you please help?
Edit: I do see the images in the Media Library, but don't see them on the page when it loads.
Try to move your db with plugin WP Migrate DB
Upload a new site to hosting, after local development, as follows:
Copy the site folder from the local server to another location.
Export the Database to the copied folder with the site.
Using the editor (the normal editor should have a search-replacement), replace all occurrences of 'localhost/your_folder' on the site and in the database on 'yoursite.com'
Upload the site and the database to the server, respectively.

Wordpress Add "login/?msg=membershipRequired" to my URL

I have a website (built using wordpress) running in host server. I am trying to run my site in local machine. I install xampp, copy of my sites files, and export/import my database to local apache server.
However, when I am trying to open http://localhost/inj/public (/inj/public contains all wordpress files and folders), the url changes to "http://localhost/inj/public/login/?msg=membershipRequired" and the page shows "Object not found!".
I have changed my site and home url from wp-options table. But the problem is still there.
Any help?
Maybe you are using WooCommerce and have a restriction accidentally added? Have found something about it here: https://docs.woocommerce.com/document/woocommerce-memberships-settings/

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 keeps redirecting on locahost when migrating from live server to localhost

For some unknown reason my live wordpress fot blocked, showing following message on each hit
"This site has been temporarily disabled, please try again later."
So, In order to recover data I copied my wordpress site files from domain to my PC. I uploaded the database to phpmyadmin, updated the wp-config.php file for my localhost but every time when I try to hit the site from browser* i.e. "http://localhost:8080/my-site-name/" it keeps me redirecting to the url "http://localhost/my-site-name/"
*my localhost is set up to the port 8080
open database, wp_options table, find row with site_url, home_url.... it's using old value, change them with new address.
Directly copying files from your live WordPress directory and import live database into local will not work as expected.
For this you need to updated all links in you local database with
local server link (Use search in phpmyadmin for domain and replace
with local one.
You may need to updated your .htaccess file according
your local server.
For getting backup from live to local you use
plug-in like Duplicator.
Here is a link duplicator where you will find plugin for backup and restore.It backup both php files and database.so need to import db on local mysql
There is a quick hack to this also. You can create a dummy post on WordPress and publish it. Later you can delete the post. It works for me the most time.

Problems in migration from localhost to my online webserver of a WordPress website

I am finding some problems uploading a WP site from my local web server to the official online web server.
The situation is the following , on my local web server:
I have installed WP website on my computer
I have configured it
I have installed custom a template
After, I have uploaded this site in a folder on my official online web server. I have took the local database export and imported in the online database using PhpMyAdmin (to export the local database on a file and then to import it on the online database)
Finally I have changed the file wp-config.php changing the MySql connection settings and putting here the settings related to the official online database.
When I try to open the website it appears to me, here you can say how: http://www.scorejava.com/wordpress/
Ok...seems good but there are two problems:
If you try to open an article it is not open the article on the online server but in the localhost server, infact open this URL: [code]http://localhost/wordpress/?p=81[/code]
If I try to open the administration panel opening this URL: [code]http://www.scorejava.com/wordpress/wp-admin/[/code] I obtain a white page
I don't know if these two problems are related together but I think that all may depend due to a problem of location path...
I think that somewhere there is some settings that specify the URL (that can't be localhost...), but (if it is so...) where is this setting? in some file or in the database?
Some one have an idea? Can you help me?
Look into this: http://codex.wordpress.org/Moving_WordPress
There's a link on there for a "Search and Replace for WordPress Databases Script" tool that's very handy (make sure to read the instructions and have a backup of the db before using it). The problem is that image URL's and other things are stored in the database and will reflect the URL of the dev location. That tool will go through and properly update all instances from the dev URL to the final location.
Normally before you move a WP site you also want to update the site URL in the General settings as well, which may be contributing to your second problem.

Resources