0

Recently I've locked myself out of my WordPress site by changing the site URL. I fixed that problem by reverting the site URL to the original one in PHPmyadmin database.

But what happens now is that my website is working properly but whenever i access the back-end, only the HTML part of WordPress is loading and not the CSS part.

Can anyone explain to me what is happening and how to fix this?

2
  • Hi, welcome to WPSE. Are you sure this is not a cache problem? Have you tried using a different browser? Btw, did you change both site URL and home URL in the database?
    – Johansson
    Commented Jun 3, 2017 at 11:54
  • Hi, i have tried multiple browsers, all of them are doing the same. what happens is when i visit my site under localhost (127.0.0.1) the website loads perfectly. but whenever i try to login to 127.0.0.1/wp-admin it says page can't be found. wp-login gets me only HTML too.
    – Steven H
    Commented Jun 3, 2017 at 12:14

3 Answers 3

0

You may have a bad plugin causing the 'white screen of death' when you try to get into the admin area.

Check the error.log file in the wp-admin folder. That should give you an idea of where the problem is.

You could also manually disable a recently-installed plugin by renaming that plugin's main folder in wp-admin/plugins . But looking at the error.log file should be your first step.

Added

Add this code to your theme's functions.php file at the very top (after the <?php ). It should cause error messages to be logged and shown on screen. Note that it may cause some errors to display on the live site depending on the type of error. But it might give you some clues:

// simple error trapping on screen
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// full errors
//  error_reporting(E_ALL);

ini_set('log_errors','1');
ini_set('display_errors','1'); 

Hope this helps.

2
  • thank you for helping Rick. I have searched for this file but cannot seem to find it. I am running on MAMP and my rootfolder is placed inside mamp>htdocs. I have searched the entire folder but there doesn't seem to be an error.log file
    – Steven H
    Commented Jun 4, 2017 at 10:47
  • See additional info added to my original answer above. Commented Jun 5, 2017 at 18:15
0

You should always check upon your server error log wich can be found in directadmin or cpanel or so, but you can also try the following steps.

First make a complete backup of your ftp and your database!

Then try these options: (see if it works after each step)

  • renaming your .htaccess files to old.htacccess.old

  • renaming you plugins folder to oldpluginsold

  • moving your wordpress files and directories into public_html

  • rename your wp-includes and wp-admin to oldwp-includesold and oldwp-adminold and move all your files in the root directory of wordpress into a new folder named oldbasedir, then download a new wordpress and place wp-admin and wp-includes and all root files into public_html (dont forget to change your wp-config)

All these steps are like a restart for your wordpress while keeping your content active, well plugins not, but when you rename the oldpluginsold dir back to plugins you can activate them one by one and see wich one is causing issues, if you still have no luck let us know.

0

So what i did to solve this issue.

I hardcoded the right url's into the wp-config.php file in which they were missing completely. Although this prohibits me from updating the site or home url through the wp interface in the future, it was the best solution for me at the time.

Thank you all for replying and trying to help

Steven

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.