Local host WordPress website URL changed not able to revert back - wordpress

I wanted to test my localhost WordPress website on a mobile device on my local network, So I changed my website URL and Site URL to http://192.168.1.3.8888 (wifi IP: Mamp apache port) previously it was http://localhost:8888/wordpress, Now I am unable to access the site from own pc with the new or the old URL.
I think in the new URL I used a '.' instead of a ': ' between the wifi IP and Port number can somebody help to revert the changes I have made or make this work.
Thanks!

Open phpmyadmin or another mysql db manager
Browse your website's wp_options table.
You will see 2 related rows there called "siteurl", and "home".
Fix them to correct address.
That's all.

You can replace or export data using Wp Migrate DB.
Easy to replace any url in your current database without lose any data or serialization issue.
Changing the Site URL multiple ways.
net::ERR_CONNECTION_REFUSED
Change your post 8888 to 80 in site & home url.
Its best to run of port 80 though instead of 8888.

Related

aws centos 7 wordpress apache redirect

I've got EC2 Amazon Linux 2 instance with apache, mariadb and wordpress
VPC, Security group, ACL are set up correctly, i'm using same rules for other websites and works perfectly
telnet ip 443 and telnet ip 80 - both are reachable, checked and connected
I don't have access to DNSes, so I changed windows host file. Both are pointing to the same ip.
x.x.x.x example.com
x.x.x.x example.sandbox.com
ping recognize both and showing that there is no issue with host file.
First website with SSL.
Second website without SSL (tests purposes).
They are using same database but different schema. So table
wp_options and value for home and siteurl are set up correctly for
https://example.com for first one and http://example.sandbox.com for
test one.
First website is working fine, showing example.com with SSL. Nothing to do. Problem is with test environment. Everytime I try to reach example.sandbox.com chrome first shows me warning that page is not secured (expected) and after that redirects me to example.com. Same with Firefox. After added exception it redirects me to example.com. I run out of ideas...
Apache configs in comment. Have no idea how to paste it into post without error. Spent hour on it...
Found it!
Wordpress plugin really-simple-ssl. Removed it and it works.

How to access website using hostname instead of ip address?

I am working on a wordpress website and I'm unable to access my website using the host-name. [However, I'm able to access my website through the ip address. For example, when I enter 10.20.0.18, I'm directed to 10.20.0.18/wp-admin/plugins.php]
I am new to hosting and I was just able to update my hosts file and properly link the ip address to hostname by reading through some articles.
I also checked these links are correct using ping command.
For example, my hosts file looks something like this,
#Host file starts here
127.0.0.1 localhost
10.20.0.18 www.webserver.abc.com
66.155.40.202 api.wordpress.org
#End of host file
Now, when I try to access the website using hostname through my web browser, I get this error.
This site can’t be reached www.webserver.abc’s server IP address could not be found.
I am not sure where I am going wrong, or do I need to make some more changes in other files?

Website Hosting error: took too long to respond

I developed a wordpress website on localhost but when trying to host the website i get this error. www.medina.com took too long to respond.
Search Google for medina 8080. Any idea why this is happening?
I have edited my wp_options to the site url.
For running your website on local machine you need to use IP Address, your request is something like that
http://YourIPAddress:PortNo
If you want to use your own HostName, For that you need to put a entry in host file.

Amazon Web Services - EC2: How do I stop my WordPress site showing the ip address as the domain?

I am close to tearing my hair out on this issue as I just cannot seem to get my Wordpress site to not read the Amaazon Public IP address.
I have a domain name in GoDaddy and have changed a host record so that my domain name "http://example.com" redirects to "http://0.0.0.0".
However once this page loads, the url quickly changes back to the Public IP address.
I have tried changing the Site URL in the Wordpress Settings but this just breaks the site and does not allow me to log in.
What is it I am doing wrong? I just cant figure it out. I just want the domain name from goDaddy to appear as the URL.
Thanks.
First of all attach the Elastic IP to your EC2 Instance so it wont change public IP after you shutdown and restart your machine. Make A Record in your Godaddy DNS Record File that points to the elastic IP.
You have not changed the base URL of your wordpress thats why it is still redirecting to the old Base URL. Connect to your EC2 instance and edit wp-config.php add the following line of code
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

How to change a localhost url to ip in wordpress?

I am developing a site using wordpress, MySQL and Xampp. The current url is like localhost/wordpress/sitename.
How can I change the localhost to an ip address to get the site working on other computers on the same network?
First Change url in "wp-option" table in site_url and home_url.
then change folder name in .htaccess file. and then change database name in wp-config.php file
In my scenario I found that intranet users weren't receiving the images and other resources (stylesheets) when connecting to my locally hosted wordpress site by url. The problem was that the urls for those resources were being emitted as localhost, which of course wasn't useful to their machine.
The general solution is to update the Wordpress Address and Site Address on the General Settings tab in the Wordpress dashboard with your ip address rather than the default of localhost, then everything will be emitted relative to that.
In my case I wasn't able to edit those directly for configuration reasons I haven't resolved. I found the solution on the Wordpress site under the Relocate subtopic on "Changing the site URL". It's simple.
Near the end of the wp-config.php file, just before the line
/* That's all, stop editing! Happy blogging. */
add the following
define('RELOCATE',true);
Then navigate to your site using the url rather than localhost and the setting s will be updated. In a local network situation where your url is changing frequently you could just leave the switch set to true, but on a production server it would be a security risk, and you should revert the setting to 'false' or remove the statement promptly.
put this statements into wp-config.php :
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') {
define('WP_SITEURL', 'http://localhost/wordpress/sitename/');
define('WP_HOME' , 'http://localhost/wordpress/sitename');
} else if (strpos($_SERVER['REMOTE_ADDR'],'192.168.1.') !== false) {
//local network: see ifconfig
define('WP_SITEURL', 'http://192.168.1.57/wordpress/sitename/');
define('WP_HOME' , 'http://192.168.1.57/wordpress/sitename');
}
You put your IP address allocated by the network's DHCP server(if it exists) instead of 'localhost' it should work. else just put your ip address form the other computers connected to the network.
Eg. If your IP address turns out to be 127.23.45.66
You should enter this in the address bar of the other comps
127.23.45.66/wordpress/sitename
You should change the site URL in your Wordpress settings to your IP else Wordpress will always redirect to what is in the settings.
after you access your site by 127.23.45.66/wordpress/sitename on any browser in your network including your own device.

Resources