How to browse Wordpress links on a local network WAMP server - wordpress

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

Related

Can't Access Wordress homepage after changing local URL

i recently started developing a site for my local business and it doesnt have to have a hosting and a domain. I will use this site to show my clients what they're getting and giving them choices.
Fast forward yesterday, i changed the siteurl and homepage url in phpmyadmin to make the site locally accessible, and i was accessing it though. Today my ip was changed and i changed the ip adress through phpmyadmin. Now i can access all of my pages but homepage. I can access admin panel, access categories page and all other things. But when i try to open homepage it redirects me to the old URL, what should i do?
I am using Astra theme with Elementor, Woocommercial, Cartflows etc.
you can go to phpmyadmin from your host.
go to "options" table. change the "siteurl" to thing you want.
but if it is true, you can do a test.
creat a new page for your home page and set that for homepage from general-option -> reading .
test that. It should be work.

IP address showing instead of domain address for my wordpress website

I have a domain name from NameCheap, and I am hosting a WP site on Amazon Web Services EC2. I have already changed the A record to so the site pulls up anytime i go to myDomainName.com. Everything works fine until I hit the home bottom on the website. At that point the IP comes up in in the address bar. Any pages i access after that will have the IPaddress/page.
I know I may need to change something in the wp-config.php, but I don't think I have this file on my computer (I used AWS to launch WP, and I don't think I have download anything about WP except some plugins). My website address change option in setting-general on WP is also greyed out so I cannot change it. Anyone has any idea how I could make my domain name display?
Any help is appreciated. Thank you so much!!
have you tried changing your home and site url in wp-admin? If you go to wp-admin/options.php you can change the home and site url fields to your domain name. You can also do it through phpAdmin or editing the DB directly (wp-options table).

IP Address showing instead of Domain name on my Wordpress site

I am having an issue where I have a Domain name from Go Daddy, and I am hosting a WP site on Amazon Web Services EC2. I have already changed the A record to so the site pulls up anytime i go to www.bemoremarketing.com. Everything works fine until I hit the home bottom on the website. At that point the IP comes up in in the address bar. Any pages i access after that will have the IPaddress/page
From what I have gathered, I may need to change something in the wp-config.php, but I am unable to find where this is. Any help is appreciated.
You need to change the Site URL.
You can do this through the Wordpress Settings at Settings > General > Wordpress Address/Site Address, or in the wp-config.php file
define( 'WP_SITEURL', 'http://example.com/wordpress' );
For more details see https://codex.wordpress.org/Changing_The_Site_URL.
Go to settings of wordpress. Then, change the URL as given below.
I do not know if this is still of interest but make sure you have all your pages linking to the actual www.yoursite.com
Also, make sure that your HOME link on the menu links to the www.yoursite.com instead of IP.
Changes made in the WP Settings > General are also needed.
I have fixed the same issue. My domain name is purchased from GoDaddy too. I use a raspberry pi and wordpress to build a website.
For GoDaddy.com, following this explain,
Use Forwarding with masking in your DNS management.
After changing wait for a while.
Go to your website by searching your domain name and it won't change to IP address on the address bar.
I didn't modify WordPress Address (URL) and Site Address (URL)

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

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.

Wordpress Multisite: Mixing IPs, domains and URL Proxies

Our company is trying to transition to WordPress Multisite but we have several issues working against us at the moment. We host WP outside our server environment (we use Amazon for our WP sites) so we actually have to use an URL proxy to our Amazon servers. The other issue is that we needed to install Multisite in the root of the folder so the domain is http://100.10.20.30/foldername but we can't proxy that to http://www.domain.com/foldername because that is a live site that we're not moving to WP any time soon. So, of course, the problem we're running in to is that the IP is showing up not only in the source code but in Google now as well (which we don't want).
Does anyone know of anything we can do to keep the IP out of the source code/Google? I was thinking about rewrite rules in the htaccess file but didn't want to do anything until I had some better ideas.
Also, I can't use the domain mapping plugin that everyone seems to suggest for this type of issue because our sites aren't hosted in the root of our server (a prerequisite for the plugin).
So to break it down, this is what we need:
Multisite Parent Blog <-- This has to be the IP address
Multisite child blogs <-- Domain name but when we set the actual proxied domain name in the settings we get a 404 error because it's not looking in the right place. It's looking for an actual folder on our internal servers.
Thanks!
Found the solution myself. Posted below:
In the Multisite dashboard, click on "All Sites" then administer the specific site.
Under the "Path" field, you'll need to deselect the "Update siteurl and home as well."
Save changes.
Click on "Settings" tab.
Change the URL in the following fields: "SiteURL" and "Home"
Save changes.
When all is said and done, the IP is showing in the "Info" tab but it changes the URL in the source code to your domain.

Resources