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?
Related
I am migrating my site to digital ocean and I am having an issue with Https. I have moved the directory and the apache2 config file and mysql database. I believe I set everything up correctly but now I want to test it. I have edited my /etc/hosts file with my new ip and sitename.com. However when I try to go to my browser and look to see if the site works it keeps trying to redirect me to the https version of my site.
I have tried going to chrome://net-internals/#hsts and deleting the site but it still redirects to https. How can I test my site without being redirected to the still hosted version of my site?
Thanks!
Aside of the wp_options field, WordPress stores lot's of links 'hard-coded' which all will contain the https. You would need to do a full search and replace on the database, but be aware of serialized stuff. To to safely perform a search and replace you could use a program found on: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Works like a charm.
Another way is by using wpcli if you have commandline access and wpcli is available. From the command line go to your root directory (containing the index.php) and type:
wp search-replace https://www.your-domain.example http://www.your-domain.example
Or type:
wp search-replace https://your-domain.example http://your-domain.example
Based on your setup up course.
Always make a full backup of your database before performing these actions, so you can restore if any problems occur.
I have a 32bit Win7.
I am trying to set Wordpress 4.1 up to work on Wampserver 2.5.
I copied the extracted wordpress files into my own folder within the c:wamp/www folder. But after going to the localhost page, clicking on my folder under 'Your Projects' opens to a 'This Page Is Not Available' page, which cites either non-connectivity (not the case), or misconfigured network, or unresponsive DNS network or firewall issue.
I tried looking this up but nothing. Pls let me know how to fix this.
Alternatively I tried localhost/myfoldername in my browser, and the Wordpress installation begun with language selection and then the 'lets go' button, then the form to be filled out.
Can I proceed this way or would it involve issues later
Check the URL it tries to redirect you, probably gives you just "wordpress". Not sure if it's a bug in WampServer index.php or something that needs to be configured, just type http://localhost/wordpress (or how your wp folder is named) to your browser?
I had a bit similar problem. It can be by using bad folder to enter your page.
1) You have only wordpress or anything else on your server? If the other pages are ok, i will try jylipaa's option. If it doesn't try to change localhost for 127.0.0.1:8080 or 80 - that port is standard for wamp, xampp, or vertrigo.
2) All pages doing it? This question can be rather non-relating but do you use skype? IF yes, it often happened that skype roguely take port 8080 for himself and don't let you know that. Try to configure your wamp to another port and use http://localhost:81/ for your instalation. That was option i tried and now everything is ok.
Hope this will help.
What I want to do > I need to run a version of my live website on my local machine.
Why I need to run it on local machine I need to edit the website on my local machine and when everything is perfect copy it onto server. So I can easily make changes to the website without scaring of breaking the live website.
Whats the problem > I could run it on my local machine but when I log in to wordpress from localhost it redirects me to the live server.
What steps did I followed > I followed this question, installed mamp and downloaded whole wordpress directory to htdocs directory of mamp, then exported the database on server and imported it to my local server. Ran the server, entered username and password and was redirects to the live server rather than running the website on my local machine.
The code is the same, you just have to edit the database configuration of localhost and change domain to localhost.
tl;dr:
run this to fix it: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
long answer:
Most importantly, the "Home URL" and "Site URL" on the Settings -> General need to be changed. Also, many other URLs are saved into the Database including the domain name. Since some of them might be php-serialized, just search/replace in the database might screw up some things.
The Wordpress Codex has lots of info on moving / clonign a site. Still, the easiest way is the tool from tl;dr above.
I have a wordpress site hosted on WAMP on my local PC. I want other people on my network to view this website but when I tested it from another PC none of the stylesheets, scripts etc are being loaded. I troubleshooted it and found this is because it's looking for those files on localhost. How can I change it to look for those files relative to the folder? Thanks
What you have done is a bit like moving the site to another domain. Because WP records the domain name in its database when you install it, it thinks its domain is localhost.
Now you are getting to it by lets say using your ip address 192.168.0.10 this is considered a new domain name and when it attempts to server various resources it is still using the original domain name of localhost it cannot find those resources on the other PC's.
You can find out what you need to do here on the worpress site Changing the site url
I solved this by using my IP address as the site path in Wordpress/Settings/General
I've migrated a local install of Wordpress to my host.
Now, when I attempt to load the site (ex. "www.mynewsite.com") the browser will churn for a while, then report that my site couldn't be loaded because it's taking too long to respond.
I notice that the address bar of my browser now reads: www.mynewsite.com:4001
What does it mean when ":4001" becomes tagged on at the end of your url?
What was your basic wordpress configuration? You need to set the website address in the wp-config.php while moving your wordpress website to a new host. This is just because when you install wordpress on localhost it takes the 127.0.0.1 as native path, what you need is to reconfigure the configuration file, it looks like your local setup ran on 4001 port!
:4001 is your port number, it looks like your site was developed on that port, connect to your website's database and edit your WP installation's options table (default wp_options) update entries siteurl and home (usually entries 1 and 37 respectively) to your new url.
if you were developing locally using a host name identical to your live site you will need to disable the host name so you can view the live site.