Wordpress multisite issue - subsite admin no longer working - php

We have a wordpress multisite (subdirectory set up). It was working witout issue a few weeks ago. (We generally do updates weekly to any necessary plugins and the core, etc.)
Both of the front ends of the sites work (what the users see). The issue is in the admin / dashboard access.
So in our case, we have:
network
us (main site)
ca
We can get to the main site admin without issue.
If we follow the link in that admin to our network dashboard, the link fails:
https://blog.konicaminolta.us/wp-admin/network/
If we update the link to include the "wordpress" directory, it works:
https://blog.konicaminolta.us/wordpress/wp-admin/network/
Our current directory setup is (and has been from day 1):
htdocs
wordpress
wp-content, and all other wordpress files, etc.
It seems like an update (core or plugin?) may have changed a setting somewhere?
We can get into the CA site, but we run into errors like:
admin-ajax.php not found
The CA site displays without any CSS of any kind
We tried to do a restore from backup, that failed as well. (Site went down with "critical error" and we had to do a manual restore from backup.)
Any thoughts? The primary questions is how / where we can fix the setup to account for the Wordpress directory or how else we can fix this issue.

This is probably caused by a plugin. Deactivate all plugins and see if the issue still exists.

Related

WordPress login page just refreshes after successful login

Background:
I have a WordPress website that lives in a Google Cloud-based load balanced environment, and as I work through getting CI/CD setup I elected to isolate one of the servers so that my team could properly run through isolated testing. Since the website is on a regular domain (www.mybusiness.com), I created a duplicate database from our production DB and pointed the isolated server at this new test database. From there, I updated both the 'siteurl' and 'home' values with the isolated server's IP address in my wp_options table, and from there I can access my isolated WordPress site by simply using the URL. However, this is where things get frustrating: the login page simply refreshes after a successful login attempt, while blatantly incorrect login attempts with invalid credentials properly return user login error messages.
After countless hours searching the Internet, Stack, and elsewhere, I've found that the most common solutions are either:
Clear your browser's cookies / cache.
Try logging in with completely different devices (other cell phones, laptops) to confirm it's not a device or local browser-cache issue.
Deactivate and test each plugin,
Confirm your 'siteurl' and 'home' values are correct.
Test your .htaccess file to confirm that's not the problem.
Clear your user's WordPress 'session_tokens' meta_key value.
Revert back to an older / default WordPress theme to confirm if it's a theme problem
Run WordPress's built-in DB repair tool.
Create new WordPress salts and swap them in inside the wp-config.php file.
Enable the 'WP_DEBUG' constant to see if anything in the error logs pops up.
Test non-HTTPS versions of 'siteurl' and 'home'.
After trying all of the above, nothing seems to work: reverting to an older theme (twentynineteen) still presents the same login page refresh issue, and I've gone through every plugin on the server to see if deactivating one or all of them creates a solution - none seem to be the root cause. Error, mysql, and auth logs are also maddeningly clean.
Interestingly, if I add a trailing slash to my IP address-based 'home' and 'siteurl' value, from 'https://11.11.11.11' to 'https://11.11.11.11/' I do successfully get to the correct internal landing page (https://11.11.11.11/landing-page/) - however it just displays a 404 with the basic white screen.
Current WordPress version: 5.4.7
This leaves me with a few questions:
Is this a file permissions issue somewhere? Are there any key WordPress files in which permissions could create this effect?
Would Apache or anything VPC be in play here? I checked out our Apache .conf files, but those don't seem to be the suspect.
Should we look into a WordPress upgrade knowing we're a bit behind with 5.4.7?
Thank you in advance for the help!

Change Wordpress theme on theme-broken installation

I'm developing a Wordpress theme for a client, and I've done a mistake that caused the Wordpress to show the classic error page "There has been a critical error on your website". It's very simple to fix this when you have some advanced access to the server (like an FTP, SSH, cPanel, web-based file manager or something else). But, in this case, I don't have any other access than wp-admin!
I've asked my client for some access (FTP, cPanel or any other), but he don't have any other access too.
So, thinking a bit, I still logged in on this Wordpress (cookies are set), and I'm trying to change the theme from URL (I know the Twenty Twenty One theme is installed). So, I copied the URL that activates the Twenty Twenty One theme from my localhost, changed the domain to match the domain of broken website, and picked up a nonce from DevTools. The final URL is like this:
http://dev.example.com/wp-admin/themes.php?action=activate&stylesheet=twentytwentyone&_wpnonce=5f324abc99
Tried to access this from my logged-in browser and... Won't work :( It shows the "There has been a critical error on your website" message.
So, I'm here to ask you... There's another way to change the Wordpress theme outside the panel on a theme-broken installation?
Thank you for all!
Good day, mate.
I see its a common problem when you install Plugin
or theme and everything crash(
If you can not have access to FTP or Cpanel, try to Reinstall WP.
It will delete all themes and refresh the plugins.
After that you can upload and install new themes and website will work.
Go to Dashboard, click Updates and find Re-Install Wordpress button.
Tell please of it helps you...

Moved Wordpress site and on login redirects to home page

I meticulously backed up a working WordPress site, files DB tables, the works. I moved it to a new server, got everything working, the site renders, the DB is recognized, etc.
The issue is anytime I try to log-in, after login the site always redirects to the homepage (mysite.com/index.php)
I have scoured every PHP page for text like 'site_url' and 'wp-redirect' 'redirect' looking for the offending code that will not direct me to the admin dashboard.
To be honest, I am not even sure what page the site is supposed to redirect to.
I can always reinstall, but then I'd get stuck with the daunting task of having to manually rebuild all the headers, with the images, embedded flash and the rest of it.
Since the site was working at the previous location, and not a single byte was lost on the move, with all the tables updated to show the correct server name, I am stuck on this issue.
I have looked at all the StackOverflow links related to this issue and none of them addressed my issue specifically.
WordPress never does such redirection. Some security plugin can do. To fix the issue. deactivate all the plugins, you can do this by executing following query
UPDATE `wp_options` SET `option_value` = '' WHERE `option_name` = 'active_plugins';
Once done login and activate the plugins one by one and check which one causing the issue.
I had to re-install WP altogether. Once I did that, I was able to login and see the WP dashboard.
To reinstall, I relocated all the files in the main directory and the wp-admin, wp-content, and wp-includes folder. All the other folders I left alone, because they are not affected by the WP install.
After the install, you will have to open the wp-config.php file to input the new db name, db user, db password and db host. What you will see is the WP install added a fresh set of tables in the db you named in the config file. The only folder you will then have to copy and paste is the theme folder from the old site into the themes folder in your new install.
Now that you can login (yoursite.com/wp-admin), to populate your dashboard, import all the records from the old db table into the new one (the one with the pages and posts you want). If you do that right, all the pages (and blog posts) should populate in the dashboard window.

"Wordpress MultiSite Through Azure, Additional sites all say "The resource .... is unavailable

So I'm working through windows azure to make a Wordpress multisite (sorry if this question seems obvious,I just can't seem to find any documentation or videos on this being done before, though I'm sure it has.)
I've set up my Wordpress multi-site through windows azure portal gallery.I have the Network admin dash board. So I'm confident I've done the first steps correctly in converting a Wordpress into a Multisite. I set up the network as sub-domains.
The issue is whenever I make a new website through the multisite network admin dashboard and try to edit it i just get "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
my question is do i need to custom map domains in order for this to work? or do i need to be adding another step with azure.
How can I just create the Multi-sites without having custom domains for each one if this is the problem?
Thanks!
If you setup the network as sub-domains you have to have a custom domain for the website and point your subdomains. About how to do that, see Adding custom domains. Otherwise, you could choose sub-directories as the type of multisite network instead.
For more information on sub-domain vs sub-directory setups see the Types of multisite network article on the WordPress Codex.
However, according to the error you aforementioned, seems there is a mistake in web.config file WordPress generated. You can find the correct one in following threads:
How to set-up Wordpress Multi-sites on Azure using sub-directories
getting 404 error on admin panel for sub-directory multisite on a sub-domain in wordpress

No longer able to access Wordpress admin panel

I am no longer able to access the admin panel of a Wordpress site. 2 days ago I added a plugin, loaded some new content, and things were working fine. The client loaded some regular blog posts, and today, it no longer works.
First of all, the error itself:
I go to URL: mydomain.com/wp-admin, the browser redirects to: mydomain.com/wp-login.php?redirect_to=http%3A%2F%2Fmydomain.com%2Fwp-admin%2F&reauth=1
The error message says:
Not Found
The requested URL /mother/18/readf.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
What I know so far:
Nothing in .htaccess redirects to mother/18/readf.php
A search of similar errors gives a lot of results where urls within normal sites seem hijacked to sell antidepressants, viagra, etc. When I say normal sites I mean that there are sites that do logistics,
https://www.google.com.ar/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=mother//readf.php&safe=off&nfpr=1&start=10
https://www.google.com.ar/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=mother//readf.php&safe=off&nfpr=1&start=10
Disabling all plugins doesn't help (I renamed the plugins folder and then tried to log into the admin).
Searching the database for readf.php or mother doesn't show anything obvious.
The client claims to only have made changes to content since yesterday, when the site admin was still working. (Yes, claims... they have superadmin access, so this might not be true).
Has anyone come across this issue? Any ideas on what I can look for next?
Sounds like you got hacked. Time to fix it right the first time, or you will get hacked again. You need to replace all core WP files/folders (except wp-config.php and wp-content), but scan the uploads folder and theme for exploit code and modified files or added files, like readf.php. Replace all plugins, too.
Also scan the database for eval code and added administrators. (See "My Site was Hacked" below).
Change all host, FTP and WordPress passwords in the process. Scan your own PC for malware that might have grabbed logins and passwords.
Tell your web host you got hacked; and consider changing to a more secure host.
Carefully follow FAQ - My Site Was Hacked at WordPress.org.
Then take a look at the recommended security measures in Hardening WordPress and Brute Force Attacks at WordPress.org.

Categories