Wordpress PHP Error after modifications in functions.php - php

I was making modifications in functions.php which is generally in Appearances/Edit of wordpress dashboard. As soon as I made the changes and updated the file, the website crashed: now it shows a lame white dead page with some syntax error codes. I do not have access to admin panel / wp-admin. It would work to erase all those wordpress data base and restart, but it means a lot more work. What should I do now?

Related

Posts List not displaying in Wordpress admin panel

I Have 260 posts in Wordpress blog. But only the first one is displaying in the admin panel. (wp-admin/edit.php). Pages and comments list are loading without any issues.
The server error log says:
PHP Fatal error: Cannot use object of type WP_Error as array in /home/jxjx/public_html/jxjxjx.com/wp-includes/class-wp-list-util.php on line 152, referer: https://jxjxjx.com/wp-admin/edit.php
Tried these:
Updating Wordpress, Themes and Plugins.
Disabling All plugins.
Reinstalling Wordpress.
Cleaning up and Optimizing the database.
Allocating More memory and execution time.
Update
Changing the theme to default
But on the front end, everything works well. What can be the problem ?
This could be a theme issue. You said you disabled all plugins, which is great, but what happens if you revert to the default 2017 theme?
Also, edit wp-config.php (located in the main install folder), and near the bottom, set WP_DEBUG to TRUE. This will hopefully provide us with more necessary information.

500 internal server error on drupal admin pages when adding a custom theme

I am trying to accomplish adding a custom theme to a drupal installation. Here is what I am doing and here is what I have tried:
I am downloading an instance of drupal 7 using acquia devdesktop.
I am using either php version 5.5 or 5.6.19 (both versions still get me the same error eventually.
I then navigate to sites/all/themes/ and create a new theme. In my case the folder is called homesite. I then add the files:
-homesite.info
-screenshot.png
And then here is when it gets a little tricky. I am able to see my new theme under the appearance tab in the drupal admin UI. I am able to enable my theme after clearing the cache. I am even able to add a page.tpl.php and start to see my theme come to life. But when i start adding more files - like html.tpl.php I immediately start getting a 500 insternal server error on the admin pages only. Sometimes i am not even able to add a page.tpl.php file before this starts happening.
After i start getting this error, i am no longer able to see any updates on any of the files take hold, but only once I start getting this error.
This tends to make me believe it is a memory limit issue, but when i change the memory limit in php.ini, I then only get a white screen on all urls.
I have tried uncommenting lines in the .htaccess file like 'RewriteBase /' and so on and so forth to no avail.
The answer is that when drupal was scanning my theme directory for .info files, it was getting caught up with all of the .info files in my node_modules directory.
Follow the directions on #4 on this link (#12 takes it a step further)
https://www.drupal.org/node/2329453

My wordpress admin page shows white screen

I was asked to change this site
http://www.ellabar.com/ ,so i created a new test site as a sub domain of the main one as
http://test.ellabar.com/
Once the test site was done i was supposed to change the url to main one. I changed the url to main through general settings. Which i should not have done. Everything disappeared. I could not login to my wordpress login.
I searched a lot of topics to find a solution of changing urls in functions.php file of my theme folder. That worked but after sometime again it stopped working. Now someone suggested this to me on wordpress forum
See:
You'll need to use FTP or Cpanel to change those back - the functions.php file method is pretty easy to do.
If the functions.php file is messed up, using FTP change the name on your active theme's folder - which will force WP to use a default theme (twentyfifteen). Then use the same functions.php file method to change the site URL's back in that twentyfifteen theme.
Now this is what happens.
If i change the name of functions.php to anything else say wpfunctions.php than i can see the wordpress login page, correctly log into the dashboard and work in back end of wordpress but the website disappears. If i rename it to functions.php than website works correctly but wordpress login becomes a white screen. I want both the site and dashboard working. Can anyone help me with this please. I really need to make this site live in one day for my client.
Im using wordpress 4.0 and default theme is twenty fourteen.
Deactivating the current theme and re-installing it, fixed the white screen error.

Wordpress Fatal errors

I was editing the file map.php when I started getting errors. So I when to my FTP and delete map.php from it. Now I am having this error. I can't get access to neither my admin panel nor my website. Here is the URL : http://eyeandretina.com.au/
Warning: Class 'WPBMap' not found in /home/eyeandre/public_html/wp-content/plugins/js_composer/include/helpers/helpers_api.php on line 17
UPDATE :The error seems to be in the directory js_composer
The best way to handle this is to first rename the folder where the plugin lives, aka (js_composer) to (js_composer_old) or something like that.
Check your site, if the error was in that plugin indeed, the website should now be able to load and you can access your admin.
You might have some functionality missing because you just deactivated the JS visual composer plugin.
Next, reupload the plugin from your local theme backup/original download file. Or maybe your theme offers autoinstallers from within the admin panel.

Wordpress: fatal error no access on control panel/admin panel

During a clean up of my plugins inside of Wordpress i deactivated the: smart archives reloaded plugin.
Next up: a fatal error when i refreshed the page.
Fatal error: Class 'SAR_Generator' not found in wp-content/themes/waldorf/functions.php on line 469
So i couldn't access the site and also the wp-admin / control panel anymore.
Before the clean up i downloaded the whole folder for a backup.
i replaced this folder with the backupped version: no change
replaced functions.php / wp-admin & wp-includes: no change
checked my wordpress version: 3.5.1 downloaded a fresh wordpress folder and replaced those wp-admin & wp-includes with the ones on the ftp: no change.
What to do ??????
It's difficult to provide a quick reply without seeing what the exact lines were in the waldorf theme that you have, however, it seems to be that the theme assumes that the Class 'SAR_Generator' is available by default and doesn't check if this isn't the case.
I suggest logging in via ftp and finding this section of code in your functions.php around line 469 and comment this out and possibly other lines that relate to this.

Categories