Site will not load. Why is ":4001" showing up in my browser's address bar when this happens? - wordpress

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.

Related

Acessing WordPress locally on different network

I've been having trouble accessing my local wordpress project on different network. The site just keeps loading, and I can't even access the admin panel. I inspected the net panel. It's showing this IP instead of 'localhost' or my real local IP. Since I'm new to wordpress I would like to hear some solutions to this problem.
EDIT: The problem was in the Database. That IP was stored in options table.
I used interconnectit to change the '192.168.0.12' to 'localhost' and I can confirm that it works now.
To run wordpress on your local pc you should have a server installed, for example wamp server.
If this step is fine, make sure that you are masking correctly localhost with this ip at hosts file (C:\Windows\System32\drivers\etc).
Finally, if you are moving wordpress from another location, make sure that all db records (especially on wp_options table) have the url changed.
For sharing project hosted localhost over network, you can use Ngrok

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?

How to browse Wordpress links on a local network WAMP server

I have read a post on this topic but I have an issue.
This is what I did:
I have a WordPress site accessible locally using http://localhost/mysite
I put my WAMP server online from WAMP options
I disabled Windows firewall
I created a limited network between my PC and my Android phone successfully
I got the IPv4 address of my PC from network properties which is 192.168.42.219
I launched / accessed the website through my connected phone successfully with the address http://192.168.42.219/my site
But whenever I click on any link within the website, instead of opening
http://192.168.42.219/mysite/thepage
the address
http://localhost/mysite/thepage
shows in the address bar and
Page not found
error displays.
If I type the address
http://192.168.42.219/mysite/contact
on the address bar and enter, it will open correctly
How do I browse the site perfectly with all the links working?
Wordpress will try to honor the domain you define in the admin dashboard, so you must change it from there. You should be able to navigate using your IP address while in the dashboard without having the domain enforced.
In case you can't, you'll need to edit a certain record in the wp_options table, but that would be overkill if the first way works.
Open wp-config.php file within Wordpress root. at the beginning of the file, right after the batch documentation add these two lines:
define('WP_HOME','http://192.168.42.219/mysite');
define('WP_SITEURL','http://192.168.42.219/mysite');
changing mysite string to whatever your document root folder is under C:\wamp\www.
Depending on your situation, you may need to hit a Save Changes on Wordpress Permalinks submenu page, under Settings admin menu.
Note that the homepage link is not populated dynamically through WP_HOME and WP_SITEURL, so you may change it manually into IPv4 version, thorough Menus submenu under Appearance

Website preview for a wordPress based site on a development server

I have created a demo website for a client. I installed the site on the client's live domain name and I used the etc/host DNS trick to point the domain to my development sever. Now I want to send a live preview to client for validation but I don't want to bother her with technical details such as modifying local computer host file. The client doesn’t want to switch the domain to the new site either, until everything is ready as the site is highly active. I have tried the cpanel temporary link (mod_userdir is enabled) but it breaks everything including styles and scripts. Do you have any solution. Thanks.
Update: I have found this site if it can help nodns.io, they only need the emulated domain name and the development server IP.
You can still use the temporary URL and that is the easiest way. You just need to make a change in the WordPress database. You can go to cPanel -> phpMyAdmin, open the database and look for the _options table.
Once you find it, you need to change the home and siteurl options to the temporary URL:
https://codex.wordpress.org/Changing_The_Site_URL
You can follow the "Changing the URL directly in the database" directions.
Goodluck!

Wordpress on WAMP: Need to change site looking for assets on localhost

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

Resources