wordpress migration broken links - wordpress

I am experiencing a problem with the wordpress migration.
I held my website on localhost beofre (xampp server in computer). It all worked fine so I decided to move it to a real domain. The website is http://www.cupavortex.ga .
I exported the database from phpMyAdmin in xampp, and imported it in the new database in the wordpress site. wp-config.php is already configured
The only thing working is the homepage and the buttons.
The images are not appearing.
And when I try to click on any link it redirects me to the old addresses (for example, when I try to click on “Desfasurare”, it redirects me to localhost/CupaVortex/desfasurare because that was the old link. I can’t acces wp-admin nor any administrative tools but phpMyAdmin and FileZilla.
Also, the site is hosted at 000webhost.com, and yes, I modified the mysql name to mysql4.000webhost.com from localhost, and replaced utf8mb4 with utf8 in order for everything to work. I just want to find out how to replace the links, I don’t really care about the images.. Theme used is Astrid.
Thanks in advance

Have you updated your database 'home' and 'site' url entries? This is done in wp_options, both need to be the new base url! After that, if thats the issue, you'll probably want to refresh your permalinks in the wp-admin settings section.

Go Back to your old local host website for a sec.
Steps:
Go to Settings->Permalinks and set it to numeric values.
Check if you have not used a custom link inside the website for any images or post or anything. If you do then change it to the new numeric values from it.
Now just export the sql datasheet and website back up from old host to new host.

Make sure you update ALL absolute links to posts, images, files etc.. by running the following plugin: "Velvet Blues Update url's"
What this will accomplish is (according to own personal experience and taken from plugin developer's page is)
FEATURES:
Users can choose to update links embedded in content, excerpts, or custom fields
Users can choose whether to update links for attachments
View how many items were updated
Last edited by Dimitar Coklev on Feb 18, 2018

Related

WordPress Woocommerce 'view basket' link points to old website

I have developed a WordPress webstore using Woocommerce which works fine on my dev server (e.g. dev.foo.com). However when I migrate the site to my live production webserver (e.g. livefoo.com) and point the live domain to the site the 'view basket' button which appears once you have added an item to your basket still links to the dev server (e.g. dev.foo.com/basket, instead of livefoo.com/basket). I have run a couple of search and replace plugins to update the mysql database to change any instances to the new domain but the problem still remains. Any ideas?
Thanks
Thanks for everyone's help. I ran through and checked permalinks, database etc. I finally found some hard coded lines in a woo commerce template page called 'footer-woo.php' which I replaced and everything now is working fine.
That sounds like you need to go to your wordpress setting and save your permalinks so it can be rewritten. if this does not solve the issue please export the database again and open it in wordpad and do a search for the link on your dev site to ensure that the database on the live server no longer has any of these links left in it. wordpad is very useful to use to check ur database file for these bad links. Good Luck

wordpress move to localhost missing css

I'm trying to move a wordpress/buddypress web site to my local pc.
I created a virtual host with the exact same host name, copy the code and DB.
It works but every time I change the C:\Windows\System32\drivers\etc\hosts file to see the live original site, chrome miss-behave and get stuck.
So I tried to change the site domain on my local pc - I search&replace the code & db export from the site domain to my local domain (e.g. mydomain.com -> mydomainlocal.com), and I reinstall the DB.
The site is running but it seems to be missing some stuff - specifically design stuff, e.g. css is different, and logo display the site name instead of the logo.
It seems like the new domain name triggers a different configuration of the site, or a different theme.
Can someone please explain how to properly move a wordpress site localy with a local domain name?
I read some posts about this issue and it seems I was doing it right, I actually don't understand why the site looks different if I changed all reference both in the code and DB.
I'd suggest the problem lies with the fact you've performed a search and replace on the database.
WordPress serializes some data and by running a search and replace on it you'll have changed the lengths therefore breaking the serialization. Often things like theme options are stored in that way and will appear to reset when broken.
In order to update the URL you'll need a more advanced tool like: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Further information: https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs
First You must change domain name in database wp-options table
where option_name is suteurl and home
If not help, see in wordpress admin panel theme settings, some
themes have setting and in setting those can have url setting
In browser , in source you can find errors, and in errors you can see
not correct urls
I was able to solve it answer thanks to Nathan Dawson answer, here are the actual steps I did.
I switch back to the original DB (in wp-config.php),
setup the local host of the original domain mydomain.com (NOTE that I didn't delete the settings of the new local host - mydomainlocal.com)
In mydomain.com/wp-admin/options-general.php I changed the WordPress Address (URL) and Site Address (URL) to the new domain mydomainlocal.com
click save
After saving this settings the site redirects to the new domain immediately, but since I kept the setting of the new domain it worked, and the problem is solved.
EDIT - a quick and simple solution is simply change "siteurl" and "home" in the database table "wp_options" (through phpMyAdmin or similar)

moving WordPress over to domain, after working on it locally through MAMP

I've finished the styling changes on WordPress and I'm ready to move it from MAMP to my domain.
Will this involve any changes to the WordPress files or can I just drag it over to my new domain once I purchased it?
The main start you must make is update your wp-config.php
define('WP_HOME','http://www.mynewdomain.com');
define('WP_SITEURL','http://www.mynewdomain.com');
That way wordpress knows what domain it MUST run from.
The reason you do that is because without this you may not be able to access admin, login, etc etc.
When this is working and you have logged in, go to wp-admin and go to your permalink settings.
Make a NOTE of your settings, then change them to default (and woocommerce settings etc).
Go to your home page and a few others, and notice how messed up your urls look :)
Now go back to permalink settings and restore them (the point of this is to make sure your .htaccess file that wordpress depends upon is set correctly)
Finally, have a look at https://github.com/veloper/WordPress-Domain-Changer to change your sql etc if needed.
note this method is very handy for developers so you just update your wp-config.php for localhost or development or production (not for testing purposes, don't use your local pc. copy it all up to a subdirectory of your hosting partner e.g. http://www.mynewdomain.com/mytestarea. Make sure you use a COPY of the mysql database (never point both to the same database). You now can test on the hosting platform without disturbing the live site or your development causing issues to other people.
It's been a long while for me personally, but you'll want to change the SiteURL via the options menu in wp-admin.
Otherwise, just make sure your MySQL database is exported over, your credentials and user permissions are all setup and those work too.
If you still have problems:
https://codex.wordpress.org/Changing_The_Site_URL
https://codex.wordpress.org/Moving_WordPress
The database has to be updated. What always works for me is that I export the database from phpMyAdmin or MySQL (using mysqldump) and open the exported .sql-file with a text editor, like Sublime Text.
Now you want to find any occurence of your previous URL. Let's say on your dev machine the URL to the index of your Wordpress site is http://localhost:8080/wordpress and you want it to be on a website under https://domain.com you simply do a Find & Replace using that and replace everything with https://domain.com.
For older Wordpress versions you have to update the .htaccess files if you have custom URL's.
You have to make a search replace in your database and replace your local domain ( test.lo ) with the live domain ( test.com ).
To do this you can use the script from here: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Add the searchreplacedb2.php file in your route folder and the access test.lo/searchreplacedb2.php and follow the steps there. This will replace your local domain with your live one everywhere in the database.
You can't make a simple search-replace because the local domain might be serialized in some fields in the database, and a simple search-replace will not replace those.

Have you ever encountered Wordpress settings that wouldn't stick?

I'm in the middle of moving Wordpress from localhost on my local machine to the live web. I modified the wp_options table's siteurl and home values to point to blog.site.com/. It worked the first time I entered this url, but subsequent url entries would not display the blog page.
Is anyone familiar with this problem?
It's not really straight forward to change the URL of a wordpress site after the initial install because the database contains references to the initial url.
Have you tried following the steps outlined in these pages?
http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change
http://codex.wordpress.org/Changing_The_Site_URL
You can use this script to update the DB referees from the old url.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Once you change the url in the wp_options table and upload the new database, make sure the first thing you do is go into the live site and set your permalinks. Even if you just go in and click save. This should update the url accordingly. However, any links in the content areas, widgets, etc. will still need to be updated manually with the new domain.
There are also some tools to help with this type of migration. Haven't tried it yet, but have heard good things about WP DB Migrate Pro

wordpress page permalink is not working on local

I have wordpress website on server, created pages and that's working fine, but when I download wordpress files and DB on local and want to run with localhost, permalinks for pages are not working.
It seems this is an old post, but this might help others that encounter same error.
Select:
Apache –> Apache Modules –> and that will display the lists of available modules.
Now just check rewrite_module.
source from WordPress Custom Permalink not Working in Localhost
Hope that helps.
Sometimes when copying from one server to another, wordpress' permalinks goes a little screwy, try setting them back to default (using the admin panel) and then setting them again to your desired permalink structure (being sure to apply the changes each time).
you need to go into the database and change a few options.
Goto your phpmyadmin installation and navigate to wp-options table. Change the siteurl and home options to your localhost address.
Wordpress needs these database tries to build your permalinks. If they are wrong, then it will direct your links to incorrect locations.
You can simply fix this by doing the following:
Go to settings in your WordPress site.
click on permalinks ( You will see the URL structures of your newly configured WP site. (if it shows your original website values, go to settings-> general and set your local site URLs
Don't do any changes, just click on the Save button.
Refresh your local site and click on your page link or post.

Resources