Being redirected to 127.0.0.1 from Wordpress/Apache installation with AMPPS - wordpress

I have installed AMPPS (Apache + MysQL) with Wordpress on a Windows 10 computer to quickly setup a website. The website is working fine locally.
Now, the problem that I have occurs when I try to access the website from another computer.
When I enter the server IP ( http://219.223.239.3/ ) on another computer, a main webpage show with the main directories:
This indicates that the other computer can connect to the server.
However, when I try to access the WordPress subdirectory on the server ( http://219.223.239.3/wp/ ), it redirects to http://127.0.0.1/wp/ and the webpage does not show. Hence, it seems that there is some configuration problem with WordPress or Apache.
To try to solve the problem, in Wordpress, I went to Settings>General, and I have set the "Wordpress Address" and "Site Addresss" to http://219.223.239.3/. Moreover, I have edited the Apache configuration file to change "ServerName" to 219.223.239.3:80. But it still does not work.
Otherwise, all the settings should be the default settings of AMPPS.
I am not very familiar with Apache.
Does anyone knows how to solve this issue?

Check the wp-config.php file in the root of your wp folder. I had the exact same problem and it turned out the credentials for establishing a connection to the MySQL database I had running locally were incorrect.
In the Ampps management console (typically located at localhost/ampps/ in your brower), open up PHPMyAdmin and check the user credentials for the database connection.

Related

wordpress on apache2 not display correctly css only on windows host

I did a recently installation of wordpress with apache2 on ubuntu server . The web can be displayed correctly on any host just display the html
I am new in the web world, so I don't have much skills in it
I was looking for and I suspect is a css problem compatibility
In windows host I have the following
windows browser
I tried with all the possible wk , clear my cookies,other browser . etc
without results
Both machines live in the same network with the web server
Hope you can give some ideas
Thanks
I finally found the problem.
When I was inspecting the page with google. I saw some objects like wp-config.php is not working, It have a message of resources can not be loaded, connection refused so I change the address url and site url on the wordpress configuration to my domain, and I enter on the web server(ubuntu) a entry for my domain in /etc/hosts with the local ip of my webserver

AWS EC2 instance showing IIS Page on Public IP even though localhost shows WAMP

I created a Windows 2016 Base EC2 Instance and installed IIS on it. But soon realized that I have to run WAMP to host PHP sites so I installed WAMP and stopped IIS service and everything was working fine.
Then I made a few changes to the site (It's a Wordpress site) and published it and since then the public IP is showing IIS page.
I have tried renamed iisstart.html to iisstart (to trick system into
thinking the file doesn't exist) from IIS folder but the public IP
is still showing IIS page.
I have tried restarting the instance machine. Localhost is showing my wordpress site but public/elastic IP shows IIS.
I have tried restarting WAMP, no luck.
I don't know how is it possible that IIS page is shown even when the file is renamed.
I have tried creating an Elastic IP as well but didn't worked.
Ok! So the issue is fixed! Now posting solution for anyone who will reach here (maybe my future self)
There was no issue with AWS EC2 or WAMP. The issue was in importing Wordpress.
When I imported Wordpress the Site Address and Wordpress Address changed to localhost. Due to which the IP was redirecting to localhost of destination machine.
Solution:
After you import your Wordpress, goto wp-admin -> Settings (in Side Bar)
And change the Site Address and Wordpress Address to the public/elastic IP of your instance.
Then clear Cache/Cookie on your destination machine and revisit the IP. It should work. (It did in my case)

Failed to run wordpress website on local machine, it gets redirected to live website

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.

How to restore local wordpress server from cash?

I'm fairly new to development and have been trying to create my own wordpress theme. While editing the theme today I made a mistake in the code and now the wordpress page won't load at all. It's just a white page and I can't even access wp-admin. I have wordpress installed locally with Bitnami.
I've researched how to fix this wordpress crashing problem and everyone keeps saying with FTP. But with a local server, from as far as I can tell, I don't think that works. I'm using Cyberduck and have tried to enter the IP address of the local server wordpress site to access the files but Cyberduck doesn't pull anything up. I have also tried stopping the server and starting it again and this doesn't help.
How do I recover my wordpress site from a crash when it's stored on a local (Bitnami) server?

Drupal Multisite, MAMP and SVN Best Practices?

I successfully set-up Drupal Multisites with:
site1.domain.com
site2.domain.com
site3.domain.com
using Virtualhosts and editing the etc/hosts with MAMP on my localhost. I then deployed it using SVN (it deploys automatically) on the live site.
The Problem: when I type "Site1.domain.com" because it goes to my localhost instead of my live site. Is there anyway to avoid this? (apart from renaming the subdomain, because it speeds up deployment)
Just check your virtual host settings in httpd.conf file, are you using IP address to redirect them?
And if its directing to your localhost, just check your host file, if might be redirecting because of that

Resources