I created a site with WordPress
I also use the Promosys template
When I open the site, the site is white for 30 seconds and then it shows the information
Interestingly, the site is loaded but shows a white screen and is displayed after 30 seconds
I am using the wprocket plugin, I felt that there might be a problem with this plugin, I disabled it but it did not work
first, try to increase PHP memory limit by adding the code below to your wp-config.php
define( 'WP_MEMORY_LIMIT', '256M' );
could be a problem with your theme as well.
try with a default wordpress theme and let us know how it goes after adding the code.
Related
I have a WordPress eCommerce website in this website all working but admin menu page not working and the page showing blank, and I was trying to add a new image that image does not upload and not showing the old image in media library only loading process see attachment
In order to solve this issue, you need to see what error is causing this blank page. By default, PHP suppresses errors display for security reasons, but Wordpress has a setting to show the errors.
In order to turn on error display, open your wp-config.php in the root folder
And add these two lines:
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG', true );
NOTE: You must insert this BEFORE /* That's all, stop editing! Happy blogging. */ in the wp-config.php file.
You can read more here: https://wordpress.org/support/article/debugging-in-wordpress/
Only after you do that you will be able to see the error instead of a blank page, and then share it here to help us solve it or google for solution yourself.
Each time more then 2 images are uploaded to Media, or sometimes when a page is in execution a Form asking for FTP login parameters is displayed like an error...
After some research and any answer from the theme company's support.
The next patch was applied and all seems to work well.
File : wp-content/plugins/trx_adons/includes/plugins.files.php
Line 163 commented
//add_action( 'after_setup_theme', 'trx_addons_init_filesystem', 0);
File: wp-content/themes/astudio/includes/utils.php
Line 726 commented
//add_action( 'after_setup_theme', 'astudio_init_filesystem', 0);
If the issue returns i will keep you informed!
Admin bar appears after adding code to the functions.php
add_filter( 'show_admin_bar', '__return_true' );
but empty except for the WP logo and the search on the right.
I installed latest version of twentyTwelve, it didn't appear,after adding the same code to the theme's functions.php it appears with the same problem.
So I don't think it has to do with the theme.. So I deactivated all plugins, And I still have the same problem.
Note: There is no problem with the admin bar in the Dashboard. Also I checked the HTML structure, it's not hidden by CSS.
<?php wp_footer(); ?> + <?php wp_header(); ?> are defined in the themes header and footer.
If the toolbar is forced to load (via show_admin_bar) but a user is not logged in it has nothing to show the user. When this happens it looks exactly like your screen shot with just the WP and search icons present. The toolbar will load anytime a user is logged in though so there is no reason to force it to load unless you intend to modify its behavior to include actions for anonymous users.
I was able to recreate this easily in a clean install but only if there was no user logged in. If this is happening to you when a user is logged in then I suggest a fresh install of WP in a subdirectory, or locally, then enabling your theme and plugins one by one until it breaks so you know which component is causing the problem.
I am using Wordpress v.3.3.1 With Multisite management on.
I am trying to disable the auto draft function, but it seems that I have tried everythig.
What I have tried:
define('WP_POST_REVISIONS', false);
define('WP_POST_REVISIONS', false);
Didn't work.
I have tried to remove the auto_save lines in post-new.php, post-php. Both in wp-includes and in wp-admin. Didn't work.
I have also tried several plugins, but they won't do it! Any idea why?
I notice that you are asking about disabling Auto-Drafts and NOT Auto-Save.
You cannot disable Auto-save, but you can achieve a similar affect by setting a long interval, for example:
define( 'AUTOSAVE_INTERVAL', 3600 ); // Default is 60
(You'd add it in your WordPress site's wp-config.php file.)
As for Auto-Drafts, you don't want to disable them. They are there for an important reason. Let me grab a quote or two for ya...
Samuel 'Otto' Wood, Tech Ninja at Audrey Capital (Matt Mullenweg's angel investment company), says:
Auto-drafts exist because of the fact that multiple users can create new posts at the same time. If two people enter post-new at roughly the same moment, then have their first autosaves occur nearly simultaneously, then there is a race condition that can cause one of them to get back the wrong post ID, which will cause a post to be overwritten/lost when they then continue editing the post.
The auto-draft creates the post and gets the ID of the new post before the editing screen is displayed, thus preventing two simultaneous authors from accidentally having the same post ID in the data in their browser.
Andrew Ozz, who worked on WordPress' TinyMCE integration, says:
This also makes it possible to upload images before the first draft is saved and they will be properly attached to the new post.
And lastly:
Auto-drafts are automatically deleted after 7 days of going unused. They're self-cleaning, basically. No need to worry about them.
A) Set it in your wp-config.php file. Else it won't work.
define( 'AUTOSAVE_INTERVAL', 3600 ); // autosave 1x per hour
define( 'WP_POST_REVISIONS', false ); // no revisions
define( 'DISABLE_WP_CRON', true );
define( 'EMPTY_TRASH_DAYS', 7 ); // one week
Open wp-config.php located in your WordPress root directory and add following code:
define('WP_POST_REVISIONS', false );
before of require_once ABSPATH . 'wp-settings.php'; or and top of the file.
For guys who use WordPress 5.0+ version with Gutenberg Editor, the below code snippet works to disable auto drafting/saving
/**
* Disables auto saving feature for Gutenberg Editor (set interval by 3600s)
*/
add_filter( 'block_editor_settings', 'rsm0128_block_editor_settings', 10, 2 );
function rsm0128_block_editor_settings( $editor_settings, $post ) {
$editor_settings['autosaveInterval'] = 3600;
return $editor_settings;
}
I think disabling it is not good (for example, when you parallely try to publish 2 posts, then there may be problems). So, instead, of disabling:
Method 1)
disable them slightly (without CORE-modifications), see this answer.
Method 2)
just clean them using this code or good plugin WP Clean Up
Please could anyone help me with this problem? The wordpress admin bar is not displaying on the front-end (public visible pages) of my website. It shows when I'm logged in at the backend i.e Dashboard though. User settings are ok (set to show admin bar when viewing the site). I have tried deactivating (then, re-activating ) installed plugins, still no show.
Just a background note:
I recently transferred the site to my webhost (I was developing locally and everything worked and is still working). And I have a custom folder for wordpress. I was wondering if the problem has to do with this.
Please help I have searched everywhere but seems everyone is looking to hide the admin panel instead.
Thanks in advance
Check that your theme includes a call to the function wp_footer() at some point, usually at the very bottom of footer.php. That generates the code required for the admin bar to show.
add this to the end of your footer.php in your theme folder:
<?php wp_footer(); ?>
problem solved :-)
Most of the time the wp_footer() call is right where it should be so if you still can't see the admin bar then try the following:
log out of the backend
navigate to the front-end
clear your browser cache
log back in using the absolute url i.e. yourwebsite.co.uk/wp-admin
and then see if it comes up - worked for me.
Also make sure the "Show Toolbar when viewing site" box is checked in your user profile page or whatever you try ain't gonna work my friend!.
I know this is an old question, but another option - If you purchased (use) a pre-made theme make sure that theme does not remove the toolbar in its code.
Does it 'know' that you are logged in ? when in front end ? ie: meta widget shows 'logout' instead of login. if not Did you by any chance play around with the cookie paths?
I got myself confused because I was logged in at backend, but not front end. This was because I'd being playing with the cookie path and forgot to uncomment what I'd done.
First, double checked all of the other items mentioned here (wp_footer(), etc).
Three more things to check:
make sure header.php has <body <?php body_class(); ?>> not just <body>
try disabling plugins one by one if you're still having trouble. (For me, the Simplest Gallery 2.7 with WP 3.7.1 caused a conflict that made the admin bar disappear)
look for function remove_admin_bar() { return false; } in the theme's functions.php - change it to return true.
Just add in your template
<?php wp_footer(); ?> before </body> and <?php wp_head(); ?> before </head>
For me the issue was that I was using http://mydomain.com/wp in the WordPress address but http://www.mydomain.com for the site address. We had added the www to the WordPress address so that GoogleAnalytics would work and that's when the Admin Bar broke.
Adding www to the WordPress address fixed the issue.
To clarify after a lot of searching for a solution, similar to MattKnowles solution but more specific: Make sure that in settings > WordPress Address (URL) and settings > Site address (URL) that if one has www then the other also does and the other way round. Otherwise it seems while you are browsing the site it is a different domain to the admin area and the admin bar does not show.
Make sure site addresses are the same! I had one set at http://www.example.com and the other (WordPress) address set to http://example.com or visa versa.
I had them set this way because I though it was needed for the site to show up when you type the url without the www.
Now that both addresses are the same (with the www) my admin bar works, I stay logged in, I can comment, see preview or draft content, cross-site authenticate and logout, wow!
an entire year of wondering why WP just never worked right across over 30 websites!
Going to change addresses to the same "www" address in the rest of my 30 sites now and enjoy error-free WordPress for the first time ever...it's a great day!
Remember to remove any admin bar code you may have added in your theme's function.php file or in your styles.CSS
Thanks to all who help us here!
wp_footer() ,
add this function to footer.php
My #wpadminbar had a z-index: 99999;
In an act of myopia I made a sticky header that was in conflict with the Admin bar's stickiness. I had a z-index greater than the admin, making it rest behind the visible div.
I made my own sticky less powerful.
Here's a solution that I found.
Need to have <? wp_head()?> and <? wp_footer(); ?>.
More info: http://blog.frontendfactory.com/how-to-add-wordpress-toolbar-to-your-custom-theme/
Still working on this, but there is a conflict with Woocommerce. if deactivated, toolbar is there. Active, no toolbar.
More info here.
I had a sitiation when the admin dashboard was opened in one Chrome tab, but I could not make front-end part opened in the other tab to enter the admin state and show the admin bar.
The front-end always opened as if I had not logged in as an admin in the other tab.
The issue was that I had the site opened in yet another Chrome window (not tab) as not-logged-in visitor.
As soon as I closed all the tabs and all the sessions and reopened the single Chrome window with two tabs (admin / front end) the admin bar appeared in the front end.
Beware of unclosed HTML tags above <?php wp_footer(); ?>. Unclosed tags in the source will have closing tags generated by the browser and can suck in the WordPress admin bar HTML.
...
<div class="hidden-by-css">
<span> You can't see this</span>
<?php wp_footer(); ?>
</body>
</html>
That will cause the HTML generated for the admin bar to get sucked into the .hidden-by-css DIV and your admin bar won't show up.
So make sure you close all your tags. :)
I wanna leave my solution since I tried literally every possible solution on the internet. The website has LiteSpeed and is behind a reverse proxy from Deflect.ca similar to cloudflare, it blocks and caches as well.
The problem is the default cache from Deflect is set on 10 minutes and that caused the problem. Setting it with lower settings and removing all admin caching from LiteCache solved everything.