I have a WordPress website that's been running for almost two years now. All of a sudden, it started to show a blank page on any public page. The admin part on /wp-admin is still working without any problems.
A http request is successful (status 200), but the returned content is completely empty (not even an tag).
I'm not really a PHP/WP expert. A simple web search got a lot of results, but mostly old stuff and never any clear conclusion of the problem's source, i.e. how to fix it. I already enabled WP_DEBUG in wp-config.php, but this only shows debug messages in wp-admin, but the public page remains blank.
Where should I continue searching?
The problematic website is http://lolkitten.org/.
Update
I just found index.php inside my public_html, which was empty. After writing something into it, it appears on my home page! Also, there's a directory /home/<user>/home/<user>/public_html/ which looks like complete nonsense to me.
Update 2
The Problem solved itself after upgrading to Wordpress 3.8. I don't know why, but it seems like some files (like index.php) were messed up and got replaced by fresh ones in this update.
Possible solution / workaround
I've had this problem again. This time, my index.php was completely empty. In my dashboard, under Dashboard > Updates, I clicked on Re-install Now and it fixed itself.
Most likely the wp-content folder can’t be found. When you login to the admin does it state that the templates can’t be found in red text in the center of the page right when you login?
I recommend going into your wp-config.php and adjust—or add—the following constants:
define('WP_SITEURL', 'http://lolkitten.org');
define('WP_HOME', 'http://lolkitten.org');
define('WP_CONTENT_DIR', '/path/to/your/wp-content');
define('WP_CONTENT_URL', 'http://lolkitten.org/wp-content');
Fairly confident that the key to fixing this will be the WP_CONTENT_DIR setting. You need the full path to the directory in the file system to your wp-content folder. So if you have a standard Unix setup with lolkitten.org in it’s own directory that path would be:
/var/www/lolkitten.org/wp-content
And the WP_CONTENT_DIR value would be:
define('WP_CONTENT_DIR', '/var/www/lolkitten.org/wp-content');
EDIT Adding info on how to determine your script’s absolute path if you do not have SSH access to the server, but have FTP access of some sort. Just FTP to the server & create a test file called test.php and just put the following code in it:
<?php
echo dirname(__FILE__);
?>
Now load that into your browser to get the full path:
http://lolkitten.org/test.php
__FILE__ is a magic constant in PHP that will echo the full/absolute path of a PHP script.
try deactivatinhg all the plugin once.
And if you can not access admin panel do the following to deactivate plugins
In the database - wp_options table
change the entry to a:0:{} on option ID 35- active_plugins
As far as i see error, it is because of share-buttons plugin.
Try removing share-buttons plugin from plugin folder and then check again.
If still problem exists then remove all active plugins and check again.
I too had same issue and it was because of plugin. I deactivated plugins one by one and my site was recovered from crash.
Related
am having issues with my wordpress website. I can't login in at all. When I try to goto wp-admin I get a 404 page not found error and it redirects to wp-login.php (wp-login.php?redirect_to=https%3A%2F%2Fmycrazywebsite.com%2Fwp-admin%2F&reauth=1)
When I goto just wp-login.php I get an error saying redirected you too many times.
I have tried the following:
Clearing my cookies - Did not work
I checked my siteurl and home in wp-options in my database - Both are correct.
Added the following code to wp-config.php:
define('WP_HOME' , 'https://mycrazywebsite.com'); define('WP_SITEURL' , 'https://mycrazywebsite.com');
Removed my .htaccess file
Added the following code to wp-config.php
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
None of them worked...Please help I have been struggling with this for days? Would it effect my site if I replace my wp-admin with a fresh one?
PLEASE NOTE:
this website was effected by the temp.lowerbeforwarden.ml virus that is going around.
I would say that it isn't an issue with your Apache configurations since it all started after your site was affected by a virus.
Create a copy of wp-config.php and download it.
Go to wp-includes directory and look for a file called
version.php. See the WordPress version that you have.
Visit https://wordpress.org/download/releases/ and download the zip
for that version.
Delete everything except wp-content directory.
Upload and extract.
Rename wp-config-sample.php to wp-config.php. Define the DB Credentials and Authentication keys (remember, you saved the old copy of wp-config.php! copy-paste details wherever needed but don't upload the old one unless you are absolutely sure that there's no malicious code in it)
Go to /wp-content/plugins directory and make a note of all the plugins installed. Delete all of them. Get all those plugins from WordPress repositories and upload the zip files and extract them.
Go to your phpMyAdmin and run this query (your table name may vary, it should be wp_posts or maybe in this format wpXX_posts, just check that):
select * from wpXX_posts where post_content like '%script%'
Review the data in post_content for each row and remove any malicious javascript code. (Copy data from that cell, paste in a text editor, review, delete everything from that cell and put back the reviewed data)
Examples (similar things to look for):
<script src='https://scripts.lowerbeforwarden.ml/src.js?n=ns1' type='text/javascript'></script>
<script type='text/javascript'>window.location.href = "SOME_URL";</script>
Also, look for any Google Analytics or tracking scripts that you didn't add.
Go to wp-contents > themes and delete all theme folders. Upload
your theme's zip file and extract and put there.
Everything should be working by now. One last step, log in to your
WordPress dashboard, go to settings > permalinks and scroll down
and click 'save changes'.
This error could occur when there is no storage space left on device where MySQL store data.
Wordpress is unable to save session data in database and redirects to login page with &reauth=1.
Try this below steps:
Turn on debugging log in wp-config.php file.
Disable plugins one by one by rename plugin folder and check site working or not in /wp-content/plugins/ path.
Rename .htaccess, wp-config.php file & upload new .htaccess, wp-config file from freshly downloaded wordpress & update your db name, db user & db password in wp-config.php file.
Mostly virus affected websites injected with some anonymous files. So check any unknowing files available in public_folder.
Repair all your database tables in phpmyadmin by this syntax: "repair table "
You can try this
Try to debugging by disabling the plugins. It could be problem because of version mismatch.
Change old wp-config with new wp-config.
For virus attacking just check any anomalie files. it can only effect in root folder.
UPDATE: Real links below to illustrate my issue.
Stick with me on this, because it is a valid question.
In the old days I could have danhoover.org which was a wordpress site and I could have danhoover.org/new which was another wordpress site and both would load fine. I could even point danhoover.net to the danhoover/new directory and the page would load just fine no matter how you got there. You could use danhoover.org/new or danhoover.net and it would load fine. All the permalinks would work. No problem.
Now, however, there is some sort of voodo going on. If a wordpress site is in the danhoover.org/new folder and configured to be "danhoover.net", navigating to the folder as danhoover.org/new will just get you a 404 error.
In addition, going to danhoover.org/new/index.php will get you a 404 error.
There is some sort of voodoo going on that makes you use the url defined in the configuration for the site to work properly. What is it? Is there any way to manually update the permalink structure so it loads properly with either domain?
I guess I'm just confused as to what in the world wordpress is doing that is different than any other php site that prevents it from loading.
UPDATED LINKS:
I have a folder /a which has campscoreboard.net pointed to it.
I have a folder /a/c which has www.c.campscoreboard.net pointed to it.
Wordpress links:
You can go to www.campscoreboard.net/c and the homepage loads
You can go to www.c.campscoreboard.net and the homepage loads and all
the links work.
But if you go to www.campscoreboard.net/c and click on a link like the
Hello World article, you're redirected back to the root for some
reason.
Vanilla PHP Links
You can go to www.campscoreboard.net/c/test.php and it loads fine.
You can go to www.c.campscoreboard.net/test.php and it loads fine.
Only the wordpress urls are redirecting back to the root when loaded via www.campscoreboard.net/c
I've not tried to install WordPress inside WordPress before, but ...
In the wp-config.php file of the relevant WordPress installation, you can set the correct URL and HOME directory manually using:
define( 'WP_HOME', 'http://danhoover.org/new/' );
define( 'WP_SITEURL', 'http://danhoover.org/new/' );
I usually add these after define('WP_DEBUG', false);
Hopefully this helps.
This shouldn't be related to the home configuration as all that would do is forward you to danhoover.org, not give you a 404.
This is likely a server permissions issue where your server is blocking access to the folders. This can be set either on the servers main config file (e.g. httpd.conf) or in a .htaccess file which can be placed in any folder to which one wishes to change its (/subfolders') permissions.
You can read some more here.
A quick way to help you diagnose this, create a static html file and place it in danhoover.org/new call it index.html and place some text in the file then load danhoover.org/new in your browser and see if the text you've written in the file appears, if not then you know it's a server/permissions issue, not a Wordpress one.
I was in the middle of migrating a local WP site to a live server and came across a problem.
I edited my WP config file and uploaded it along with the rest of the WP files. I also uploaded the mysql database through phpMyAdmin.
Once i tried to test the site i got an error message "The page isn't redirecting properly". I then, mistakenly, logged in to the admin area and in the Settings > General tab I deleted the localhost part of the URL. Now I'm unable to log back in to the WP admin area.
EDIT
To clarify, my major problem is that i can no longer log in to the wp admin area because of something I've done. The steps i took to get to this point were:
Backed up WP using the BackUpWordpress plugin
Edited back up wp-config file with define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
Created mySQL database through DreamHost
Changed database info in wp-config file
Uploaded wp files (not including mySQL backup) to my url using Filezilla
Imported mySQL database backup to DreamHost
I then checked the site from my browser, an error message said too many redirects occurred
From the wp admin area i went to Settings > General and deleted the localhost part of the url that was displayed.
I believe it's due to the previous step I'm now unable to access the wp admin area at all.
I need a way of getting back into the admin area
You can also edit those options within phpMyAdmin. Go to wp_options and locate siteurl and home. Make sure the URL matches your site URL.
You can also edit the site URL in your wp-config.php.
Add these lines somewhere above the /* That's all, stop editing! Happy blogging. */ line.
define('WP_HOME','http://my-site.com');
define('WP_SITEURL','http://my-site.com');
This should overwrite your database settings.
I believe the problem is that studiomed.co.uk is permanently redirected (301) to www.studiomed.co.uk and www.studiomed.co.uk is permanently redirected (301) to studiomed.co.uk
Login to your Dreamhost account go to Domains->Manage Domains and choose one of the three options there are in "Do you want the www in your URL?".
After that use an ftp program to download the .htaccess file that exists in your root installation of wordpress and open it with your favorite editor. Check if you have any kind of redirection in the .htaccess file.
Which version of WordPress do you use?
Can you list the plugins you are using?
Have you gone through the basic WordPress troubleshooting steps?
flush any caching plugins you might be running, as well as server
and/or browser caches.
deactivate all plugins to see if this resolves the problem. If this
works, re-activate the plugins one by one until you find the
problematic plugin(s). Sometimes, an apparently inactive plugin can
still cause problems.
If you can't get into your admin dashboard,
try resetting the plugins folder by FTP or PhpMyAdmin (read
http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F
if you need help).
switch to the Twenty Eleven theme (depends on your WordPress version) to rule out any theme-specific problems.
If you can't log in to change themes, you can remove the theme folders via FTP so the only one is twentyeleven. That will force your site to use it.
manual upgrade. When all else fails, download a fresh copy of the latest.zip file to your computer, and use that to copy up. You may need to delete the wp-admin and wp-includes folders on your server. Read the Manual Update directions first: http://codex.wordpress.org/Updating_WordPress#Manual_Update
check the Master List to see if you're experiencing a known issue
Login to your wordpress dashboard (wp-admin) and go to Settings->Permalinks, select Default and save changes.
Update all urls(path) using this querys then check:--
Use this querys for change all urls(path) for db then check
UPDATE wp_options SET option_value = replace(option_value, 'http://live_ste_path.com', 'http://localhost/local_site_path') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://live_ste_path.com', 'http://localhost/local_site_path');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://live_ste_path.com','http://localhost/local_site_path')`
[WSOD RESOLVED]
Since I could not find any solution to my problem by googling around, a crucial tracking info I finally found in WP error logs. So I would recommend to inspect logs before spending to much time looking for a proper answer by google.
After migration from an old web host to a new one, in my multisite environment all sites were working. Also, I was able to administer all subsites - but one! Trying wp-admin login to that site led me to fatal white screen. Without any message or any indication about the reason. And the culprit was corrupted file /public_html/subsite-x/wp-admin/admin.php. I really could not understand how that happened, just might suppose it appeared somehow while transferring files (FTP) from old host to a new one.
I am working with WordPress 3.5.8. Yesterday I made some changes into it to a friend. I don't know what happened, but after some time when I try to log in at wp-admin side and execute URL www.mysite.com/wp-admin it shows me a blank page. How do I solve this? I have searched over the internet and blogs. I found it could be related to hosting problems or brute force-attack, but I don't think that that's what happened to my site.
Links I visited:
http://wordpress.org/support/topic/wp-admin-wont-load-shows-blank-page
http://wordpress.org/support/topic/brute-force-attacks-and-wordpress?replies=1
http://wordpress.org/support/topic/wp-admin-wont-load-shows-blank-page
http://wordpress.org/support/topic/wp-admin-blank-page
http://wordpress.org/support/topic/blank-page-on-wp-admin
After dozens of times trying to fix this problem reading forums and posts, reinstalling WordPress, removing white spaces, putting lines of code in wp-config.php, index.php, admin.php, I fixed the issue just by renaming the plugins folder to "pluginss" in FTP. So wordpress asked me to update the database. I updated and I could enter at /wp-admin. A plugin was causing some conflict, so when I rename the plugins folder, all plugins automatically has been disabled.
As I was inside the /wp-admin dashboard, I could rename the "pluginss" folder to the regular name and start to activate all the plugins one by one and see what plugin was broken.
Now is 100% fine.
Try turning on WP Debug. If this is happening due to a PHP error (which I bet that it is), you will be able to see what's going on and fix the error.
Go to your functions.php page and delete any spaces immediately above or below your PHP tags.
I faced the same problem and I tried many things such as trying to login through wp-login.php instead of /wp-admin and adding ob_start() in /wp-admin/index.php (if you hit the url /wp-admin it goes for /wp-admin). It showed login page but entering the username and password shows an error like "cookies are blocked due to unexpected output".
I finally got the solution: it happens because the theme or plugins that you installed are not supported.
How to check and fix:
Rename the plugin folder name and theme folder name. If opening /wp-admin and entering a valid username and password the dashboard is shown, then it worked.
Revert the folder name of plugin and theme, then activate the themes and plugins one by one, cross-checking with /wp-admin. You will find out the unsupported plugin or theme.
I also had a blank screen for my blog. The solution was to copy up a backup copy of wp-config,php somehow the 'live' wp-config.php had been replaced with a file size of zero.
In my case I had the same problem. Helped remove the wp-config.php file.
Wordpress created new wp-config.php file and wp-admin is working flawlessly now.
Rename plugins, themes folder does not help.
[6] was spot on. I had the same problem
ie a blank screen where wp-admin should have been
Renaming plugins to pluginss let me get back in.
I also had a blank screen for my blog.
The solution was to copy up a backup copy of wp-config,php
somehow the 'live' wp-config.php had been replaced with a file size of zero.
It seems that it is very important to have an off-line backup
The easy way to copy of the files is Filezilla (freeware)
You need a wordpress plugin for database backup - ie to back up all your pages and posts.
But the pros will tell you that you need to get a
Peter
All your problem is solved right now just follow this instruction:
go to your themes then de activate your current theme, just put "x" in the the first letter of your theme name.
for example this is your theme folder name: "mytheme" just put "x" in the first letter like this "xmytheme" tho di activate.
Then after that go back to your wp-admin panel then BOOM! wp-admin accessable.
When you access your wp-admin panel or you are on your dashboard, again activate your theme again, but before that. REMOVE THE "X" letter you putted in your theme name.
example: "xmytheme" just remove "x", output like this: "mytheme"
then activate it in your dashboard.
hope this help!.
In my case, I was able to see the backend, but in my front I was getting a blank page...
Nothing about debugging and disabling themes/plugins was useful...
After some research, I've realized that my index.php (located at the root directory, not the theme's one) was empty!
The only content was a message saying Silence is golden.
Using a backup I had, I could get back my original index.php and get the site working again.
It might be because of a few reasons:
Problems in your web host.
Theme related errors(You can change it by renaming theme folder).
Plugin related errors(You can change it by renaming plugin folder).
An Empty line in your wp-config file.
Code errors that can be seen by enabling Debug mode.
"define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );"
Remove blank space in functions.php or you can also remove the last "?>"
I ran into the same problem a few minutes ago, the problem was when I uploaded my local theme I had a bunch of tags separating each function I had in there I solved this by putting all the functions in one php tag... Hope this helps.
I had this problem (not showing /wp-admin/), when I moved my site to new host. i solve this problem by:
1. Re mane activated theme's folder
2. Install that them again and active it
3. copy and re place some customized file like .css .js from backup
Now problem solved.
I just had this and it was a file / directory ownership issue.
Fixed via SSH and changing the ownership recursively (-R):
chown -R ownerID:groupID /home/mydirectory/website
Change ownerID, groupID and filepath to be relevant to your own situation.
Just reset the password, this will work.
I was also facing same problem but i renamed contact-form-7 plugin from /wp-content/plugins directory to contact-form-7-rename and problem solved.
So this is due to unsupportable plugins or theme.
That white screen of death happened to my blog, and what I did was that I renamed the theme and plugin, and everything was back to normal.
In my case, wp-admin/post.php blank screen was fixed by removing the " ?> " at the end of my function.php in my child theme. I don't know how the end tag ended in there, but removing it solved my problems.
Just visit the plugins folder and delete the last plugin you uploaded and should do the trick.
I found following solution working as I was using older version of wordpress.
Open file blog/wp-admin/includes/screen.php in your favorite text
editor.
on line 706 find the following PHP statement: <?php echo self::$this->_help_sidebar; ?>
Replace it with the statement: <?php echo $this->_help_sidebar; ?>
Save your changes.
i have wasted a lot of time to solve it , But the only solution i find is to rename your word press plugins folder and active theme , and your wp-admin will be visible , so then you can change and check for suspected plugin or theme.
first of all check your internet its connect!
second is turn on WP_DEBUG and write this codes in wp-config.php
define('WP_DEBUG',true);
error_reporting('E_ALL');
ini_set('display_errors',1);
third is rename themes and plugins folder that in wp-content folder to other name sush as
pluginss , themess
S F my english!
Had this same issue after changing the PHP version from 5.6 to 7.3 (eaphp73). So what I did was I simply changed the version to alt-php74.
So what's the problem? Probably a plugin that relied on a certain PHP extension that wasn't available on eaphp73.
Before you touch any wordpress files, just try changing your site's PHP version. You can do this in the cPanel.
And if that doesn't work, go back into the cPanel and activate every PHP extension there is. And if your site starts working at this stage, then it's probably an extension it couldn't function without. Now slowly work backwards deactivating (one at a time) ONLY the extensions you just activated.
You should be able to figure out which extension was the required feature.
Can it be a plugin that's causing the issue? Certainly. Maybe the rogue plugin just wanted that extra extension.
If changing the PHP version, and juggling with the PHP extensions didn't work, then try renaming (which automatically deactivates) one plugin folder at a time.
I have experienced the same problem as well. The reason was, that the functions.php was configured wrongly.
I did the following to solve the problem:
In my child theme, I backed up all my files
Then I deleted all of them leaving only the style.css page.
I could then log in.
On reloading my functions.php I found it was the culprit. I rewrote the php and it was fine.
My case was that I had generated code for three custom content types and then just pasted all the code in functions.php without renaming the "function custom_post_type" part of each function. After renaming like e.g "function employees", it worked like a charm....it displayed.
I am trying to move a WordPress site from my local server to the online server.
The problem is that, after the migration, if I try to open the administration page (wp-admin) I only obtain a white page, as you can see here: http://scorejava.com/wordpress/wp-admin/. Everything else seems work well in the homepage: http://scorejava.com/wordpress/.
In my local web server I have the WP site into the folder: /var/www/wordpress. I have moved it into a wordpress folder that is into my root directory of my online web server.
I have also import the local database into the onlyne database using MySql and then I have use the Search and Replace for WordPress Databases Script to change automatically all the http://localhost/wordpress occurrence into the database tables with http://scorejava.com/wordpress/.
There is an error on your site, and you need to find out what's happening.
WordPress URLs
When migrating WordPress sites where the URL changes, you will need to tell WordPress about the new URL. WordPress stores that information in the database, so if you're comfortable with that, you could find the correct entry in the wp_options table in your database and update its value.
I will show some fixes for standard WordPress installs (where the site URL is the WordPress root), but you may need to use different values for home and siteurl if you have a different setup.
Fix URLs via SQL
You will need to update the relevant fields in the DB, those being the entries of wp_options where the option_name is siteurl or home. You can find these fields using phpmyadmin, mysql-workbench, or another database management tool, or you can use the following query, changing the URL to be your own.
UPDATE `wp_options` SET `option_value`='http://www.myurl.com' WHERE `option_name` IN ('siteurl', 'home');
Fix URLs via wp-config.php
However, you can also do this via wp-config.php, which I find to be much more comfortable. Just open wp-config.php and add the lines:
// Site URLS (override DB settings)
define('WP_HOME','http://www.myurl.com'); //<-- NO TRAILING /
define('WP_SITEURL','http://www.myurl.com'); //<-- NO TRAILING /
Obviously you'll need to supply your correct URL.
It's possible that this is the only error you're having, and after adding those lines to wp-config.php, you will be able to log in and use your site normally.
Debugging WordPress errors
However, if you continue to experience problems, and any time you're working on developing a website, you will want to see error output. You can check your server logs for information about the errors, but you may find it more convenient for WordPress to simply display the errors in the page. To enable error display, change the following setting to true in wp-config.php.
define('WP_DEBUG', true);
Now WordPress will display any errors it encounters directly in the webpage. Be sure to change the setting to false for use on a production site.
Working with wp-config.php
This file will be located in the root directory of your wordpress installation. To make any of the changes mentioned here, you may either edit the file directly on the server (via ssh for example), or download the file with an FTP client, make your changes using a text editor, and upload the file again.
It's also a good idea to keep a backup copy before making any changes in case you break something while you're working.
References
You can read all about changing the WordPress site URL on the docs page.
Late To the party, I've experienced this recently and I managed to solve the issue. Here is what I've done.
Step 1: Set WP_DEBUG to true from the wp-config.php file
Step 2: I tried domain.com/wp-login.php instead of domain.com/wp-admin by this I was able to get atleast login form and some errors of Warning: Cannot modify header information - headers already sent by
Step 3: I've added ob_start(); in wp-login.php file after <?php in first line, of course to get me in for a while.
Step 4: This trick worked. I've disabled all the plugins, and errors are gone.
Step 5: Activated all the plugins one by one to find which plugin is causing error, So that I can fix the error in particular plugin. Like there was one plugin adding style before wp_enqueque_style so I set it to a function and hook it properly.
There were some minor errors too like deprecated functions. Its up to you whether you want to correct it or use alternate plugin.
And Don't forget to remove ob_start from wp_login.php file. The core files should not be changed.
Hope this helps someone like me.
Inside your settings for your WordPress dashboard there are two fields named "WordPress address (URL)" and "Site address (URL)". These are also known as the "Home" and the "Site URL" settings for your website. The values need to match the server you're actually running on.
If you can't get to the admin, you can use phpmyadmin, go into your database, find the fields kin the wp_options table, and make sure they reflect your domain.
It should be enough in most of cases.
I've fought the dreaded "White Screen of Death" myself a few times. You can browse the threads at the Wordpress Support Site to glean some suggestions, or Google it for lots and lots of people's stories and advice dealing with these. I can't recommend a single, authoritative reference for this.
In most of my cases it was caused by whitespace after a closing ?> tag that got introduced because of changes in newline schemes between my dev and production servers, usually in a plugin.
You might also try putting Wordpress into debug mode or adding error_reporting(E_ALL); to the first line of your site's /wp-admin/admin.php file to see if these give you any hints.
I've personally been able to avoid these (touch wood) by using the XCloner plugin to make transfers between my Win dev machine and *nix production server.
Edit wp-content/themes/active-theme-folder/function.php and add this code just before:
<?php
define('WP_HOME','http://www.myurl.com'); //<-- NO TRAILING /
define('WP_SITEURL','http://www.myurl.com');
Add the below line into the wp-config.php file:
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
define('WP_SITEURL', WP_HOME . '/');
In you wp-config.php file just above the line stop editing line add this line:
define('RELOCATE',true);
/* That's all, stop editing! Happy blogging. */
Then go to your login URL, refresh the page and log in.
IMPORTANT: If you can log in, then remove the RELOCATE line before preceding any further. Then navigate to:
Settings > General
Set your Wordpress URL and Site address to the correct locations:
WordPress Address (URL): http://example.com/wordpress
Site Address (URL): http://example.com/myblog
Press "Save".
In many cases when migrating files to a different server this issue arises simply because of a minor error in one of your PHP files. The error is additional characters after the closing?> PHP tag in the file. These may just be simple whitespace or returns but they can often be the cause of the white screen of death.
A primary culprit is the functions.php file in your WordPress theme. Take a look at it in a plain text file editor (often available with most hosting accounts) and ensure you delete any lines after the closing tag.
If it's not in this file use error reporting to identify the culprit file, it may be in a plugin or another file in your theme.
As mentioned by Jon Surrell enable error display, change the following setting to true in wp-config.php.
define('WP_DEBUG', true);
I had the same problem after migrating to a local server.
A first attempt failed because there were many hardcoded filepaths in the database.
So I tried again and took care to create the same path as on the live server and the same hostname and databasename. Now the website was good but wp-login gave a white screen.
With wp-debug I found that the problem was caused by wp-super-cache plugin that had a full filepath hardcoded in the config.php
Changing this path to the full local path did the trick.
These are the steps I usually follow.
Upload files and database.
Set the correct file permissions.
Update the database configurations in the wp-config.php file to match the server db login.
Update the wp_options table for updating the site url and home url.
If everything goes well you should be able to login to the admin using the wp-login.php as the url.
The first thing next to do is to go to the permalinks and click save it will automatically update the .htaccess file. If there is no write permisson it will show you can copy it and edit the file via ftp.
Next thing you can easily update all the urls safetly with a plugin named velvet urls . Using it for many years. It will update all other urls in the database.
All these steps will be enough if everything goes correctly.
If you get a blank page or something you can turn on the error reporting and write the logs from the wp config file itself. You can try some of these to debug.
Just remove plugins from the folders one by one.
Remove the custom theme which you are using.
Unless you edited the core files mostly it will solve the issue. Only other chance is the version mismatch for php or mysql that is also very important thing to note while migrating. Hope this helps someone.
I'm adding this answer to the fray, in the hope, it might help somebody else. I followed all of the advice above to no avail. I actually had to hack the PHP files to force my administrator to have access to the panel. It's through the panel that I discovered that my administrator account was not assigned the administrator role.
This is my hack to "wp-includes/capabilities.php"
function current_user_can( $capability ) {
$current_user = wp_get_current_user();
if ( empty( $current_user ) ) {
return false;
}
return true; // HACK to get superuser power to any logged in user
$args = array_slice( func_get_args(), 1 );
$args = array_merge( array( $capability ), $args );
return call_user_func_array( array( $current_user, 'has_cap' ), $args );
}
This allowed the Administrator Panel to appear, with access to https://example.com/wp-admin/users.php and then I could assign the role. I then unhacked the capabilities.php to ensure all users had the correct rights, now that I had "Administrator" assigned to me.
everyone. A few days ago I ported by BlogVault the WordPress multisite instance. The process went smoothly, the sites worked as needed. But I could not get into the console, allways got the error "Your browser does not support cookies, please enable them and try again". I spent several days researching and figured out that the error occurs due to an entry in the code of the page "wp_options".
The original site uses the line
define ('COOKIE_DOMAIN', strtolower (stripslashes ($ _SERVER ['HTTP_HOST'])));
but the new server uses the line
define ('COOKIE_DOMAIN', mydomain.com);"
Replacing lines of code solved the problem. Hope this help somebody)
It's maybe a late replay, but hope it will help someone else.
In my case here are steps I used to resolve the issue.
Edit the wp-config.php file from your WordPress project root and change define('WP_DEBUG', true); instead of false.
Upload the same file to the project root for the new server.
Try to log in same as previously like www.yourDomain.com/wp-admin - Hope now you are able to login the backend admin
Go to settings -> Permalinks - under common settings - choose the radio button plan then click SAVE button for a sake, then again choose day and name SAVE again, don't forget to click save, got back your domain and check your site, the inner pages should work perfectly fine.
Go back to wp-config.php and revert the value to false and upload again.
That's it.
I am not a wordpress developer but the above solution was perfectly fine for me and didn't find anywhere it's explained properly.