Internal Server Error while opening wordpress site - wordpress

I was trying to modify functions.php file in wordpress site. I added some lines of code and update the file. Now my site is not opening at shown Internal server error as shown in the image below.
I have also tried to remove new code and trying to update file again, but this error is still there. How to resolve this?
Solution:
Finally I have resolve it. The file I was trying to change functions.php, had some wrong syntax in code. I mistakenly updated the file with some wrong syntax, but I was not able to re-edit that file later on and I was not able to access to my wordpress admin panel too.
I went to my file manager and went to that particular theme and find functions.php file. I then removed that piece of code from it and issue resolved.

One thing you can try, if you have the ability to ftp, rename the htaccess file to something like htaccess_bak, to see if that fixes it. Normally if that file gets corrupted, it will show that message

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.

syntax error, unexpected 'define' (T_STRING)

Don't know much coding, getting the captioned error when I try to visit my website / log in. Looking for a solution. Thanks in advance.
You have to open wp-config.php and look at Line 4 because there is a php syntax error in the code in that file. If you want further details on how to fix please post the code from wp-config.php
I had a similar problem. Different line number, but the same basic error message, which prevented the site from loading. There didn't seem to be anything wring with the code in wp-config.
I solved the issue by downloading a fresh copy of WordPress then using FTP to replace everything except the wp-config file and the wp-content folder. Your WordPress content lives in the wp-cntent folder so you don't want to replace that.
As soon as a replaced the other files. I refreshed the browser and the site loaded normally. I'm guessing somehow some crucial file became corrupted and that kept WordPress from loading.
The only WordPress file you should be editing is wp-config. All your other data will be in wp-content or the MySql database. Retain the wp-content folder and the wp-config.php file and replace everything else. It worked for me.

After moving the wordpress site to different server admin section is blank

I recently moved one wordpress site to a different server.
After moving to different server the frontend works well but the admin section is blank.
If I rename the plugins directory the admin section also works.
How to fix this?
You have a plugin that is triggered on admin page, that has an error. Try renaming the plugin's folder one by one and find out which plugin is causing the error.
You also might want to check your apache error log. I'm sure you'll find an answer there.
Fun Fact - That blank page is actually called a White screen of death in WordPress terminology.
Read more here - http://codex.wordpress.org/Common_WordPress_Errors#The_White_Screen_of_Death
After you find which plugin is causing problem, Check your plugin main php file (ex. - myplugin.php) and check whether php tag opening and closing is proper or not(<?php ,?>).
Some times because of that it can cause problem because may be your code outputting something before header sent ("Header already sent error") and you will get "White screen of death" so try by simply removing closing tag (?>) from end of file or check properly for tag. I hope it will work for you.

Wordpress code injection in header

I'm having problems with a Wordpress installation I currently have.
There has been a large amount of code being injected into the header and I'm not sure where its coming from. I've looked over all the files in the wp-content folder and nothing has been found.
I've pasted the source here: http://pastebin.com/cLS6s9V8. It starts at line 96.
This is happening with all the pages. How can I get rid of it?
Based on the location, I would say something hooked into the wp_head() call of your wordpress site. Maybe a rogue plugin?
http://codex.wordpress.org/Function_Reference/wp_head

Wordpress function.php

I make some custom ShortCode in the funtion.php file of a wp theme. The theme is live and working. In the ShortCode i made, i made an error, totally my fault, after saving, the theme dont load, the wp-admin interface dont load either. So i am pretty much screwup with a malfuntion wp theme, and no way to WEB edit the error. By chance, i have a dreamweaver/ftp acces, i download the file, correct the error, and everything is up and running againg
The question : Is it possible to get ONLY ONLINE EDITING, and having a way to get the error, but still have acces to the admin interface to correct it, or your stuck to have an external editor... or force to write PERFECT code first time, every time...
thanks
N.B. if anybody use and onlie file editor that is fast and easy... no need for code hinting and facy html goodies, just open, edit, save.. that will be fine for me.. any name ?
This would depend on the particular error. If the error is affecting the core then it will not let you edit online. It is good practice to have your files backed up so if something id happen like you are describing you can easily revert back to a back up. I personally like to edit the files locally and then upload them. This allows me to have a local back up as well as edit files which have errors.

Resources