WordPress Can't Add new Page/Post - php

I have a problem with my WordPress and I don't know why.
I disabled all plugins, activated the default theme twenty seventeen.
Permalinks are ok I also checked that.
I even changed the edit.php file from a different WordPress where it's working.But no luck.
The problem is when I try to add new page or post it redirects me to wp-admin/edit.php.
I also checked httacces, nothing there either.
wp-debug is turned on, no errors in console nor site.
Can someone help me out?Thank You.

I'll pop my solution in here as these threads seem to reach the top of search results and it was complete accident I resolved the same issue (like you it had nothing to do with .htaccess):
If using PHP 5.6, change from FPM to FastCGI. Curiously, when we upgraded to 7.2, both FastCGI and FPM worked. Be advised that other plugins, themes etc. may have compatability issues as swapping PHP has knock-on effects.
If you're unable to do so, there are some other troubleshooting methods which are worth trying on top of disabling themes/plugins;
In Settings > Permalinks, change the URL format to "Plain", Save, then change it back to whatever you had before and Save again
Reinstall Wordpress by going to "Updates" > Re-install now

Related

Wordpress on Plesk (Ubuntu) - suddenly white screen with no html returned

I can't explain it, I didn't change anything but it seems suddenly today one of my websites on my Plesk environment (Plesk on Ubuntu) is suddenly white. No error, no php errors, nothing (even with define( 'WP_DEBUG', true ); or any other method that would help me find something.
Also the error logs for the domain don't seem to return anything helpful.
As it's Wordpress I tried to rename the plugin folder, theme folder, checked .htaccess, other configs.
But … 
I only get a completely empty page when I inspect it.
<html>
<head></head>
<body></body>
</html>
I'm running PHP 7.2.19 with "FPM application served by nginx" but also switching to some other PHP version, updating parameters or switching to apache-serving doesn't do anything.
I also checked other domains on the same Plesk installation, that work all fine.
Any ideas here?
Before you give these solutions a shot I recommend that you restart your server first as the problem might get solved by itself because we know that plesk does a lot of updating in the background.
Solution 1
Access your error logs /var/www/vhosts/yoursite.com/logs/access_log and check if there are 500 errors in there. Meaning that you need to allocate more Memory in the PHP settings of plesk (Plesk > Your Website > PHP Settings) e.g 256 or 512 MB.
Don't forget to add define('WP_MEMORY_LIMIT', '256M'); in your wp-config.php
Solution 2
Rename /plugins/ folder to /plugins.old/ and create a new empty plugins folder then go to /wp-content/ and remove advanced-cache.php. Also in wp-config.php check if you have define('WP_CACHE', true); then change it to false.
Solution 3
Your theme could be broken so switch to any default theme to find out.
Solution 4
Go to Plesk > Your Website > PHP Settings and enable errors. Then add "define( 'WP_DEBUG', true );" into your wp-config.php. Try to Visit your administration panel and view random webpages to see the errors as they could give you a clue of what is going on. Then you can google whatever error.
Solution 4
Go to Plesk > Your Website > Settings > Switch To FastCGI/PHPFPM, Apache/Nginx, etc. Try all of those in combination with different PHP versions.
Solution 5
Turn off Mod Security from Tools & Settings > Web Application Firewall (ModSecurity)

Can't Access WordPress dashboard after update

I just updated a dev site I'm working on to the latest version of WordPress, immediately after doing so I can't access /wp-admin/
on /wp-admin/ I get this error on Chrome if DEBUG isn't turned on - "ERR_TOO_MANY_REDIRECTS"
Trying to access /wp-admin/admin.php I get a 404 error
If Debug is turned on in wp-config, I see the following on a blank page:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/*****/public_html/wp-includes/wp-db.php on line 1569
Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/wp-includes/wp-db.php:1569) in /home/heavy/public_html/wp-includes/pluggable.php on line 1216
I've tried removing all plugins, deleting HTACCESS & reverting it back to the default version, removing all customizations to functions.php, updated PHP version to 5.6 .. nothing is working.
Anyone have an idea of how I can further troubleshoot this?
Try in a different browser. Some browsers annoyingly cache redirects. The only way to truly find the underlying cause of this is to turn everything back to vanilla WordPress. 2017 theme, no plugins activated. Then systematically turn them back on to see which is causing the error. Often these kinds of errors are caused by poorly developed code "somewhere" in the code base (either as customisations within core WordPress files, which you should never do by the way, customisations in parent theme files, which again you should never do, customisations within plugins, which again you should never do. This type of error can also be caused by trailing white spaces in various PHP files, so think about what you've just customised and undo everything.
This is weird, but I get into similar issues. Can you try:
keep the plugins disabled
download a fresh new WP from wordpress.org and upload all its content except wp-content folder and note for difference between local files and distant files
be sure that .htaccess fits to your needs
open a browser that you never used on this website and go to /wp-admin
I also had this error because of WP UTF8 files containing BOM. I had to use a tool to remove it programmatically (something like this: https://github.com/GloryMind/Remove-bom-plugin-wordpress/blob/master/removed-bom.php).

WordPress - wp-admin blank page

I am currently unable to get into my WP Dashboard. The wp-admin page is completely blank throwing no visible errors. I can hit wp-login.php, use my login credentials and hit Log In and then again just blank page, still not logged in. The site it self works fine.
I did enable wp_debug and this still is not showing any errors.
I just took over this site so I do not know of any recent updates or changes made to themes,plugins etc.
UPDATE: I was able to get wp-admin page to load the wp-login page properly by just uploading a clean version of wp-admin/index.php. However I am still seeing a blank page and unable to login after hitting 'log in'
I check the error logs for the server and I do not see anything related to this site.
Make sure that u don't have blank spaces in config and functions file at the top or bottom of theses.
btw, it seems like server's error. See his log :)
Sounds like a PHP error.
Add:
error_reporting(E_ALL);
ini_set('display_errors', '1');
To the top of wp-admin/index.php
A common troubleshooting technique would be to rename your
./wp-content/plugins
folder. This will temporarily deactivate all your plugins. Often such issues are caused by a malfunctioning plugin, usually after an automated update.
Another thing you can try is to switch the php version of your hosting account. Most hosting companies run CloudLinux and you have in cPanel -> Select PHP Version. You can test the administrator login with different versions.
You can also contact your webhosting provider and have them check if the ConfigServer eXploit Scanner (cxs), often installed on shared servers hasn't quarantined any of your website files.
It might be a long shot, but it is also worth checking your .htaccess file.
Good luck!
It may be caused from an error in your theme functions file. If you have a theme backup (which you are sure worked before), try restoring it from the file manager in your host panel. If you don't, try uploading a popular wordpress theme (e.g. twenty-sixteen) then change your default theme from PhpMyAdmin.
Go to your root folder, open wp-config.php,...
Enable Debug mode.(i.e)
define('WP_DEBUG', false);
to
define('WP_DEBUG', true);
And inspect it using Firebug.

ERROR: The file 'wp-config.php' already exists

I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this error:
"The file 'wp-config.php' already exists. If you need to reset any of the
configuration items in this file, please delete it first. You may try installing now."
When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.
I have tried to change the name of the wp-config.php file but that didn't do anything.
Is just a browser cache.
On first URL load, you are redirected from domain.ext to domain.ext/wp-admin/setup-config.php
If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".
Now refresh again and you will see your website
I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:
Click on General => Permalinks
Click Save Changes (to reset permalinks)
Try to display the website first on the incognito tab. If it works correctly, clear the browser cache.
Once the page refresh has been completed, the website will appear.
You can use the following shortcuts to clear the browser cache.
Windows: Ctrl + F5
Mac OS: CMD + Shift + R
This usually happens when you use an old version of Wordpress files or old database, and you use partly new files of Wordpress.
All you need to do is to delete all WP files and install a fresh Wordpress (new files unzipped from a new version of Wordpress) and use an empty database.
If you're planning to migrate or move from another website, you should use the export/import function built in wordpress.
he file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
Answer:- Please Clear Your browser's cache.
Did I miss the party?
Today I have a problem like what you experienced 5 years ago. The solution is: Remove all caching plugins (Cloudflare, Jetpack, Litespeed).
Maybe you could try to delete 'wp-config.php' file, or take a backup of this file in different folder and then try again.
If you are using bluehost and did not do the one click install :
I solved this problem by deleting the default error pages 404.php 500.php etc...
I do not know why exactly this was causing this issue... Sorry for the sloppy answer but tried clearing cache and recreating the .htaccess file it didn't work.
I removed the added spaces that the Wordpress's own web 'easy installer' created in the wp-config.php file to help me out.
Guess the Wordpress's own wp-config.php ?checker? isn't compatible with Wordpress's own installer. Wow.
Once the added spaces were removed, site comes up fine. I simply modeled the spacing that is in the wp-config-sample.php file.
Because you just installed wp.
Just hit ctrl+F5 done!!!
More likely it is cache issue and this error comes when we try to install one Wordpress inside of another sub folder of the cpanel in the same Wordpress installation and it will be mostly resolved when you try to check it in the private window or another browser
For me it was file permission set to 666 changing it to 664 worked.
If someone is still for a solution.
This happened to me on an existing site while trying to update.
the problem was following line in wp-config.php near the end.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-admin/setup-config.php');
Removing this fixed the problem.
Hope this helps.
RESOLVED: I had the same problem. post hack situation on other account, shared hosting and server NUKED. Luckily I had the backup files from one of the WP plugins but the main page didnt load, I could only go to 404 and from there to other pages but not main page, the error was wp-config eists...install...blah blah blah.....so I tried everything, multiple re-installs, changed the wp_prefix as per previous install on the fresh install and nothing helped, even ordered paid support from the backup plugin developer as I was sure that it fooked because I had Opencart also installed there but the backup was intended for WP only, my web developer also did something, perhaps removed the OC bits from DB, but thank god i managed to resolve it on my own(and justhost),. so I contacted the justhost for the SECOND TIME and they told me that the account is on VARNISH i.e. some sort of automated cache limit, so I told them to take it off and they wanted to know what have I done to reduce the LOAD to the server, so I told this and that and two seconds later everything loaded perfectly. took me about 20 hours to get main page loading, plus probably it will take 10 hours for fine tuning of the site. anyway if you contact jour host make sure you ask them if they are not blocking cahce as the first time I got in contact they couldnt help me.
I also meet with same error and Mr Pierre R is right its just a cache. Just clear your cache or check in private window. All fine.
if someone have still this error..
goto->admin->setup.php (delete this file error will be solve)
hope this will help.

Cannot Edit WordPress Themes - Various Errors

Our WordPress 2.8.6 installation is returning multiple different errors when trying to edit theme files via wp-admin. The errors are as follows:
"Invalid index."
"The data area passed to a system call is too small"
"The parameter is incorrect."
We've tried deactivating all plugins to no avail. We also tried creating a blank "plugins" directory and also still experienced these errors. Some theme files we are able to edit (very few), but most give one of the three errors above. We also tried switching back to the WordPress Default theme with the same results.
This installation is running on a Windows 2003 Server, IIS 6, PHP 5.3.0, FastCGI 6.1.36.1, and MySQL 5.1.40-community.
Sounds like your IIS config is messed up.
Try posting on serverfault.com too, this is more of a server config problem than a programming problem I think.

Categories