Wordpress HTTP 500 on theme change - wordpress

i just:
moved a remote wp network installation to local (mamp). everything fine.
installed a new theme. everything fine.
activated the new theme. doh!
i started going through the code and i found that it doesn't fix it, but at least i got a nice-relaxing-blank-white-page, if i remove the *do_action( 'init' );* from wp-settings.php.
i googled a while and i found that "*Your problem is probably wp_cron being called by init. In 2.1 and up, the cron process is called externally, so one thing that could be your problem is the DNS resolution not working on your webserver to find its own address.*"… i don't know if this could be the right answer to my issue, what am i supposed to do to fix it all?
ty!

To determine what the actual error is, you will want to turn on debugging. To do this, add the following line to your wp-config.php file:
define('WP_DEBUG', true);
It should then start spitting out lots of textual data as to what the error is. In all likelihood, it is a PHP error due to a coding issue (bad function call, missing end tag, etc.) in the new theme, or a difference in configuration between your live site and MAMP setup.
For more info on WordPress debugging, see http://codex.wordpress.org/Debugging_in_WordPress.

Related

My Wordpress is showing a blank page in the editor, how can I fix this?

I manage a Wordpress site for a client, after trying to resolve some updates I cannot seem to edit anything inside the editor anymore. Everything is blank (see image). The site itself is still up and working fine. Has anyone ever encountered this?
There are tons of reasons, why this could be happened. Like #jiali sent you a very helpful link, I would say to try and open the debugger: inside wp-config.php file search for define('WP_DEBUG', false); and change the value to true. Then, you propably would see what causing the error and where (either plugin or custom code, or maybe plugins conflict)
Okay so in this case the problem was (when I checked the error log) that the update was not properly installed. Deactivated the plugins inside PHP MyAdmin and then reinstalled Wordpress manually onto site.

Wordpress plugin is not working after migration to a new server

I have moved my wordpress site to a new server, and login.php is working right.
But in there many plugins is not working well, for example the login page is not linked to any other page after I submitted my username and password.
Here is the login page link:
https://cpalocate.ca/login/
I have entered the invalid username and password, it will also show the blank page, but not error page.
When I add this code in wp-config.php
define('WP_DEBUG', true);
it showed this text. " Notice: Constant WYZ_THEME_DIR already defined in /home/.....".
And I have fixed that, but the same problem.
Now there is no any error debug, but the login page is also not working.
I changed the php version of my site in cpanel, but the same.
Anyone has your idea to solve this issue?
It is possible (I'd even say likely) that on your old server it was using PHP 5.6 (or at least a different version of PHP than your new server) and now you're on 7.0, 7.2 or even 7.3. It would seem that if that's the case, some of your plugins are incompatible.
You should edit your wp-config.php and add
define('WP_DEBUG', true);
so that you can see the errors on your screen, at least until you figure out which plugins are causing the problems.
If it is a matter of PHP version, check with your host to see if they can roll you back, or you'll have to either contact the plugin author and have them update the plugins, or you need to fix the code yourself, based on whatever the error messages you see are.
Edit: if this doesn't solve your problem, first try a default WordPress theme like twenty-nineteen or whatever. If that doesn't solve it, then disable each plugin one at a time until you find the culprit.
I have turned off all my plugins and turn back it one by one.
I have found one of my plugins is caused this problem, it is PM Pro Settings.
So I deactivated it and there is no any problem now.
I am using other plugins on behalf of that one.

WordPress website down

I'm new to programming & I have learned how to create websites using WordPress technology. I have created a website www.popstudio.in and it was working fine before.
Recently when I try to access the website, I get the following error.
The popstudio.in page isn’t working
popstudio.in is currently unable to handle this request.
HTTP ERROR 500
I have attached a screenshot, refer screenshot
Note:
This is WordPress based website.
I have renamed the plugins folder and still the website was down.
I have renamed the themes folder still the website was down.
Common Solutions for the 500 Internal Server Error.
The two most common causes of this error are a corrupted .htaccess file and exceeding your server’s PHP memory limit.
The .htaccess file in your WordPress directory can become corrupted after you install a plugin or make another change to your WordPress site. The fix is simple. All you need to do is create a new .htaccess file.
PHP memory limit issues often occur as the result of a poorly-coded plugin running on your site or a site that’s grown considerably over time and is using too many plugins. You’ll begin to exceed the PHP memory limits set by your hosting provider once either of these things happen. The result is a 500 internal server error.
Error 500 is a very generic error message. The information you're providing is not enough for someone here to help you.
The first place you want to look at is the log file. On an Apache server it is a file called error_log in the directory of your site.
You can check if your .htaccess file is properly configured.
Otherwise get in touch with your web host support!
Good luck
Have you tried to delete (after make a backup) the .htaccess file on the root path of the site? If it work, just resaved permalinks from the back-office after that.
Most of the 500 errors on WordPress are due to a problem with this file (corrupted, rights problem ...).
Go to wp-config.php and update it
define( 'WP_DEBUG', false);
to
define( 'WP_DEBUG', true );
Make sure that once you have found your issue, to return it back to 'false'. Just as a security 'best practice'.

Wrong path within plugin files

I'm running the latest version of WordPress (3.5.1), hostet with Strato and since yesterday some of my plugins are not getting the correct path to their files.
UPDATE: It's not a Multisite!
All files are still on the server and haven't been changed or updated since friday (at this point the site was live without issues). The problem is that the plugins are looking at some kind of internal path which looks something like this: website/wp-content/plugins/xxx/xxx/xx/xx/123456789/htdocs/website/wp-content/plugins/akismet/akismet.css so all I get is an error 404 (Not Found)
I cannot locate the problem and I'm not getting any PHP errors or anything like that; only the paths are broken... the plugins are even working, but without images, css and scripts!
Therefore I've deactivated all of the plugins but as soon as I activate them again, I'm running into the same problem.
And finally I've already contacted the provider, but they cannot help at all because it seems to be a problem within WordPress.
UPDATE: I've completely removed all of the plugins, but even if I now download and activate a new plugin the path is broken as mentioned above...
UPDATE2: The wrong path looks like this:
domain.com/wp-content/plugins/mnt/web1/a1/12/123456789/htdocs/
/website/wp-content/plugins/akismet/akismet.css
instead of domain.com/wp-content/plugins/akismet/akismet.css
(actually the second version of the path is working, but all of the plugins are calling the first version, even if completely new installed)
UPDATE3: Sorry, I'm not able to go more into detail, because I've no clue what's going wrong, so I'm giving it a try from another perspective: everything is working fine, with the exception of the plugins. The plugins are even displayed in the frontend, but without any CSS, JavaScript or images. The same thing happens in the backend. I can see all of the plugins and manage (install, edit, configure,...) them, but there is no styling. Everything in case of the design seems to call a wrong path. In doing so the first part of the path is okay, and also the last part, but in the middle there are numbers which should normally not be displayed within a frontend path because they are a part of the Strato server root directory.
It seems your the WP_CONTENT_URL is not correct.
This is defined as in ./wp-includes/default-constants.php:
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
So check your settings > general > WordPress Address (URL)
You can also try to define the correct WP_CONTENT_URL in your wp-config.php:
define( 'WP_CONTENT_URL', 'http://www.yourdomain.com/wp-content');
When the above don't help check your .htaccess. Maybe wp-content/ is rewrite to the fullpath.

Notice: register_uninstall_hook was called incorrectly

I automatically updated my wordpress installation to the latest version. Everything looked normal unit "updating database..." where it got stuck. I waited for a long while and then closed the page, since nothing was happening.
Then I got a error message saying something about maintenance, which I got rid of after deleting the maintenance file.
Wordpress displays that it runs the latest version, but when I try to reinstall I get the same errror. I've tried disabling all plugins and switch to the default theme, but no luck.
I set the debug to true and I got this message:
Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information.
Everything looks normal except a image on the front page is breaking the layout.
Any tips?
The way I fixed this type of problem, was to do a global search in my project for the function call.
Some plugins had been installed which had calls such as this:
register_uninstall_hook(__FILE__, array($this,'uninstall_removedata'));
but it should be this:
register_uninstall_hook( __FILE__, 'uninstall_removedata');
If you see a message that something is called incorrectly, the Codex can be very helpful to make sure you use the correct syntax.
In this case it is here:
http://codex.wordpress.org/Function_Reference/register_uninstall_hook
Some WordPress Plugin which you have installed is firing the uninstall hook and is not setup properly.
Can you find the path to the file from the error message?

Resources