Imported from live to localhost phypadmin links not working - wordpress

I have imported my live website to localhost xampp after setup i am unable to open link associated to it for example :- my website address locally is localhost/abc i am unable to open localhost/abc/contact-us.

You need to change all domain occurrences to your local domain
If you're using wp-cli
you can do it with
wp search-replace "your-domain-name.com" "localhost/abc"
if not you can open your sql dump in text editor and do find-replace there
Also there are a lot of different plugins like https://wordpress.org/plugins/wp-migrate-db/
Also check that your permalinks are configured correctly and you have proper .htaccess file

Related

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/

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.

need assistance on my local wordpress

I just finished building my basic website using wordpress and wamp. installation directory is at C:\wamp64\www\wordpress and i'm currently accessing my site at localhost/wordpress
now i have 2 problems:
1. how can i trick my localhost to use http://www.tracking-site.com instead of localhost/wordpress? I tried changing site and wordpress address but all i get is page not found.
after changing my url, i am planning to access my local wordpress (which will now be http://www.tracking-site.com) from another PC.
2a. do i need to copy all the wordpress files to pc#2?
2b. do i need to install wamp to pc#2?
edit: i can skip problem #1 if changing site url is not important. cause my main target here is to access my localhost wordpress from another PC with same LAN. I tried adding tracking-site.com in hosts file to redirect to 127.0.0.1 then in PC#2 added in hosts file 192.168.x.xxx (my ip) then tracking-site.com. not working tho.
I don't want to host it online because my website will only be used internally in my workplace.
This should work, haven't done it in Windows in forever.
Set your site to a different URL, this is probably a bad idea honestly since WP hardcodes a lot of urls like the images, you can get past this by using wp-cli.phar to search and replace in the db but that's not a simple procedure either.
That being said it can be done.
Right click Notepad and open as administrator.
Click Open and change the file type to all files.
open the following file: c:\Windows\System32\Drivers\etc\hosts
Add the following line: 127.0.0.1 www.tracking-site.com
Question 2. Is answered here: How to access my localhost from another PC in LAN?

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.

How to move a localhost wordpress site to already registered wordpress domain

I have built a wordpress site locally. Now I want to host the site globally .
I already have bought a wordpress blog domain (i.e. It changed the site name from xyz.wordpress.com to xyz.org )
Now how I can transfer my local plugins and themes to xyz.org ??
Move all files with wp-admin, wp-content, wp-includes into your host.
Delete wp-config.php file.
Go to site URL EX: example.com and go through typical installation procedure.
Go to your database in your host and delete those 11 tables which have made.
Now you should export the local database and you should open it in any text editor and search and replace your local URL with new one.
Ex: localhost with example.com, then import it to your database of real server.
Now It should work.
To do this you have to go through these steps
1) Make a zip of your wordpress folder and upload to your domain.
2) Export your local database..Open it in any editor which has find and replace.now search for your local server name and replace it with your domain..For eg find this xyz.wordpress.com and replace with xyz.org in entire database
3) upload your database to live make changes in config file your db name ,username,pass
and you are live now
OR
check these tutorials for reference
1) http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/
WordPress.org provides the open source code for WordPress that you can run on your own website, with whatever plugins you choose.
WordPress.com provides (free) WordPress hosting, but you are limited as to what plugins and configurations you can make to your site.
read more about

Resources