Images not showing on Wordpress website after migrating to hosting provider - wordpress

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.

Related

Cloning wordpress live site to localhost (mamp) - redirect to live site

I am new in this and I am struggling with cloning a WordPress live site to localhost for development. After reading many different tutorials, I finally succeeded to clone the live site to localhost (http://localhost:8888) but when I try to login into the WordPress admin area at first it did not open at all but after trying a few times it opened but redirected to the live site.
I changed the URLs in phpmyAdmin but I always have the message "0 rows affected". I changed the URL in wp_config.php.
define('WP_HOME','http://localhost:8888');
define('WP_SITEURL','http://localhost:8888');
After this in phpMyAdmin inside my database --> wp_options I changed the site URL and home with the new localhost URL http://localhost:8888.
Nothing of these is working. What am I missing?
I recommend to make a clone by some plugin (f.e. Duplicator). It will makes for you all of the stuff like changing the url in DB, and if is anywhere a problem it gives you error report.
You can install Duplicator, make a full copy of you website (just clicking next...next), after that download it to your PC (or devie where is localhost). After that, run the downloaded php file and complete the DB login. After that, if you have correct DB with correct login credentials you should have running website copy on localhost.
More details you could find in this video: https://youtu.be/NLYyecIXOU0

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/

I uploaded my wordpress site to the web and pages link to localhost

When i uploaded my WordPress site to the web. I clicked a page from the menu and it redirect to localhost.
And i uploaded my hole new site to the web and my theme does not change?
Any ideas?
Thanks,
You need to run a search/replace on your database to replace the local domain with the live domain. Until you do that, all links on the live domain will redirect to the local domain.
This is a tool that can do that:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
To use this, unzip and upload the directory to your web hosting root, and then visit newdomain.com/your-directory-name/index.php in a browser.
Back up your database before running this.
Delete this folder after you are finished as it is a major security issue if left there.
More detailed instructions are on that page.
More information on migrating a WP installation can be found in the codex:
https://codex.wordpress.org/Moving_WordPress
I don't understand your question about the theme. You'll need to provide more details on that.

Moving WordPress from localhost to a live server

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.

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