Change Wordpress theme on theme-broken installation - php

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...

Related

Wordpress multisite issue - subsite admin no longer working

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.

WordPress kicks me out of admin panel after publishing a post or uploading an image

I configured a website based on WordPress. Every time i publish a post or upload an image i get logged out of admin panel and can not login again; I can login only if i close the window and then login with my username and password.
I did some research on the problem and a lot of people mentioned it is because of Site URL and Home URL being different, so i did make sure they are not (now they both have "https://" and "www"). Even i set "WP_HOME" and "WP_SITEURL" in wp-config.php file to be identical as well and checked the database table for these values.
Also i thought it may be a custom theme or a plugin issue so i deactivated all the plugins and changed back to default theme but it did not solve the problem. So i think it's not a theme or plugin issue.
Any idea how to solve this?

Save button redirect to home Joomla 3.5.1

Recently i installed Joomla in a hosting service, however when i add a template or modify global configuration, when i try to save or cancel, the administrator redirects to index page of site Exiting from administration and not save changes.
When i tun the project on localhost works without issues.
I had modified permissions for file configuration.php and i change the templates and search directly on code without a solution.
i search in forums and documentation and i do not find response.
Thanks in advance.
I solvet it. It appears have a problem with mod_security, i disable it and the joomla cofiguration Working.

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.

local php code works wrong in php based theme in wordpress

I'm super new with php/wordpress (first day today) and I trying to deploy application on my local machine (Windows 7/ 64bit's if that's matter). SO I get the sources - which is like a theme, deploy wordpress locally with xampp, and put my source folder to wp-content/themes
So now it works, but work's wrong. Some element's like header menu do not render, some text missed. And when I trying to do some navigation like localsite/register it realod the same page, but make page title "page not found", but register.php in the folder. This is work the same for any other pages except login. When hit localsite/login it redirect's me to wp-login.php
I do not need to change it somehow, just make local version looks and works the same as live. Does anyone have an idea why could that be and what should I do to fix it?
Probably your pages do not executes because you do not create it like pages in CMS. That's also the reason why local version could looks different from the server one.
So you need to login to remote server admin panel and replicate all stuff from live server with the same way on your local server. I mean add pages, articles, configure menus, widgets, etc. And then your local version will be look and feel the same.

Categories