Wordpress CSS changes do not reflect - css

I am working on WP 3.5.1, the latest version with a Duotive Three theme installed in it. Everything was working fine until 2 days back, but from 2 days, whenever I edit my CSS file either through the FTP or the Wordpress Admin, it does not reflect in the browser, either in the website or when I open the CSS file in the browser directly. However, the changes start reflecting a few hours later, I do not know how long exactly. But it frustrates me a lot because I need to wait for a long time to see the changes and check them.
I have tried refreshing the browser with Shift + F5, I deleted browser cache, cookies and even temp files. But still it does not work. Please help.
Note:- I have been working in Wordpress since around 6 years now, built more than 100 websites in Wordpress but this is the first time I am facing this problem. I tried to consult with my network of friends and spent hours googling, many had similar problems but not exactly like mine.

One thing that you might do is to add a version number where the css is called.
If it is called in the head, you can do it like:
<link rel="stylesheet" type="text/css" href="youtstylestyles.css?version=1.0" media="all" />
This will make the browser refresh.
There is also a variable in the wp_enqueue_style() function (if that is how the stylesheet is added) and if you up that it will force a refresh.

In your WP Admin GoTo
Appearance -> Theme Options -> Dynamic CSS ->
In this option scroll down you can see USE option
Here you need to select Internal Stylesheet from drop down menu.

Related

Product list randomly disappearing in Woocommerce shop page with W3TC

I manage a Wordpress page that had this issue before, but after doing some caching configuration (W3TC) the product list in shop page started disappearing more frequently. The only thing that brings it back is opening the page in page editor and pressing "update", no changes should be made. Purging all cache also does not help (pages are built using DIVI page builder).
So far I have reverted all of the changes that were made before, but that has not decreased the frequency of the issue.
Because of the store being live, I am not inclined to do plugin uninstalls as it can damage the page even more (Issues of page CSS not loading properly were seen before, purging cache helped in that case)
One thing that I thought about is making some kind of script that updates the page automatically as a temporary solution (a new site is going to be made eventually)
What could be done to either troubleshoot this issue in safe way or at least create an automatic page update script?
-WordPress 5.1.1 running Divi theme, Woocommerce version 3.5.7-
You say page "started disappearing more frequently", do you mean page is loaded but content disappears or it whole page does not load?
Try turning off Minifying in W3TC. I had this problem few times and always a problem was typo in CSS.
In W3TC in General Setting there is possibility to enable Preview mode, turn this on always before deploying. Turn on preview mode, check if everything is Ok, test, search for bugs. And only when you are sure that everything works fine then deploy it.
Thank you Vladimir for the tip about preview mode. The bug unfortunately is not in the CSS though because minifying is not enabled in W3TC.
By "disappearing more frequently" I mean Header and Footer being fine and Body being only partly loaded - Broken page screenshot
However, I have tracked down the issue to woocommerce itself. It seems like the default set shop page is the one crashing regularly. I did not find solution to the initial problem, but I found a trick that works, at least for now.
I created a new Shop page, but instead of linking it in Woocommerce settings, I just included a [products] shortcode. The previous page is still active, but not visible to user. Even if the shop page itself crashes, products are still visible and purchases are possible.

Is it supposed to take a while for styles to update on Wordpress localhost?

I'm programming using Notepad ++ and using a localhost to build out wordpress themes. I've noticed that I save the stylesheet, then I go to refresh the wordpress page and it doesn't show an effect. I check the source code, and it's still using the old style sheet.
Then a couple of minutes later, it uses the new one. I've seen people have stylesheets update automatically, I'd like to know if there's anything special I need to be doing to make this so?

what will happen in my website when i changed the current theme with new one?

1) Can i change the theme of wordpress in this site
www.lenews.info
with this,
http://quanticalabs.com/wp_themes/pressroom/home-style-6/
2)if i do it i lost something of image article format etc??
i need to change the theme but i don't know if i do it, what happen in the site
3) if i change the template? i want the same format of plugin and component, can anyone help me with this?
Presently I am using a wordpress theme.
I want to change it to something better. But I am afraid, if I change
the theme,
I will lose all my contents that includes Posts, Pictures,
Categories, Tags.
I am not at all aware of this fact. Need some help.
Tell me if what I am afraid of is really going to happen if I change or not.
What are the pre-steps that I can take to keep all my contents uploaded the same way they were before.
I already have a daily backup system using WP Backup plugin.What else?
Please help!
Good habit is backup before do changes.
Checklist: 6 Things You MUST DO Before Changing WordPress Themes
Take Notes on Your Current Theme
Go through your theme files and note down all additional code that you added. You also want to check your current theme’s load time because this way you can compare the two. Go to a site like Pingdom Tools or use YSlow to test out different pages (Yes different pages, not just the homepage).
Be cautious of the Sidebars
If you are using a widget-enabled theme, and you switch to a theme that is not widget-ready, then you will lose all of that. If you are using a widget-enabled WordPress theme, then this is not an issue.
Also anything that you modify in sidebar.php file of your old theme, will be overwritten. So make sure that you add those codes in the new theme sidebar.
Backup!!
You never have anything to lose by creating a backup. As a precautionary measure, you should backup all of your theme files, plugins, and the database.
4.Testing all functionality and plugins
Once you have the new theme activated, you need to make sure that you retain all the functionality and plugins still work. Try out all the features including but not limited to the commenting process, single post pages, search, 404 page, archive page, contact page etc. Make sure all of your widgets are still there and are working.
Cross Browser Compatibility
Test your site in all browsers you have access to. Browsers have a tendency of rendering things differently.
Maintenance Mode
You probably don’t want your users to see while you are making the switch because they will end up seeing a broken site or such. It is best to turn on Maintenance mode for 15 – 20 minutes that it may take you to make sure that everything is working properly. Once you have setup Maintenance mode, you are good to go ahead and activate the new theme.

Installing a new, custom theme has "broke" current Wordpress installation

I've just finished creating a new custom theme based on the underscores framework, and It's ended up breaking my current wordpress installation after applying it.
Although everything is running fine on the front end, the back end is running really weird.
The following issues have presented themselves:
Trying to add a new post (either regular, or one of the new custom post types I've defined) just results in a blank page. Although the post has been created, the admin section gets stuck on the wp-admin/post.php page.
My media library no longer shows up in the media browser. Although all 6,000+ images are still there, none show up.
When logged in, it takes ages for the page to load in the Wordpress admin bar, as it appears it can no longer display the site stats (it just shows the broken image icon after it's finally finished loading in, when the new theme is selected).
I've tried to refresh the permalinks, but this hasn't worked.
Any ideas? I was hoping to re-launch my website today, but it looks like I might have to put it on hold...
Get ahold of the devs for your framework. Your experience is not an uncommon one. It has happened to my sites several times. Unless you want to tweak the php yourself, they will have to help you.
Managed to sort this out. Turns out a function I had written to add a custom field to menu items broke the entire back end. Thanks for the help everyone!

The famous Wordpress white screen of death

Like mentioned in the title, i think this is by far one problem Automattic or Wordpress team cannot solve until no matter what version Wordpress will go in future. In this question, i am focusing to the white screen of death that i get whenever i want to activate certain plugins. I am developing a site that requires me to use 30 plugins. Yeah, some will say thats too many plugins for a site, no wonder i will get the white screen. But hey, this is Wordpress, one of the reason that makes Wordpress the most popular blogging platform is because the availability of the plugins that can make you achieve your goal in less time. For those who expert in php+wp development, you guys can say hack the wp is better than using a lot of plugins like what i am doing but hey, majority of wp users are not php guru. Most of them are normal user like me or even just know how to install and use what are available to them.
So far, here the common steps we do when get the white screen of death (WSOD).
Rename the wp-content/plugins folder name such as wp-content/plugins-temp, this will deactivate all plugins
Like me, i prefer rename the individual plugin folder name, such as wp-content/plugins/akismet to wp-content/plugins/akismet-temp
After that, reactivate all the plugins one by one, so we can know which plugin is the culprit
Check for extra empty space at the end of the plugin file, especially after the php closing tag ?> make sure there is no extra space after the tag. Make sure check at the theme functions.php file (if any) or the plugin file.
Increase the memory allocation for wordpress
Usually, your site will be back to normal after that. BUT this will still not solve this problem.
For me, this is very annoying to me, especially the step number 3. How can we know which plugin is the culprit?? At the first place, i thought the step number 3 is really a fact but now i think its a lie. WHY?
Like right now, suddenly after i activate 25 plugins, one of plugin that i cannot reactivate is Akismet. What? Akismet? Yes, the plugin dev by the WP team itself. I know the step number 3 above is a lie because if i activate Akismet first, the Akismet is activated successfully. No problem at all.
So right now the problem is plugins compatibility among the plugins. How can me as a normal user can identify which plugin that is not friendly to what plugin??? If i am using 30 plugins, how many probabilities from one plugin is not compatible to each plugin???? how can i know which plugins should be activated first so the WSOD will not appear?
If there is error, then maybe i can have a clue, but its a plain white screen. I am clueless. This clash of plugins in wordpress is really an unsolved problem that makes me really stress.
Anyone know how to fix this? At least know how to activate the plugins via mysql?
Hello :) this my first answer I hope it benefits so many people because I suffered from this stupid problem and the solution was really awkward and I can not get it but it works.
I'm here to talk about the solution for the white screen of death that comes after logging in and you get this white thing instead of the admin panel what ever the user role was.
There is the common solutions as mentioned above. In my case I had only one plugin and I did a lot of changes on it. Also I edited the footer.php in wordpress. I found out the WSOD ( White Screen Of Death ) comes out after the first changes in one of the php files of the plugin. The way I used to do the changes is by editing the php file in my computer through text editor then I would upload the changed php through ftp to replace the old one and then the problem starts. Abd when I revert the step and return the original file every thing goes back to normal.
If you having this problem the solution would be very simple and I really don't know why no one have ever post it before.
The solution would be by simply putting your changes through the editor you have in the admin panel. There is two editors, one for the theme and the other one for the plugins.
Open the editor in the admin panel for the plugin you want to modify insert the changes that you want in the text editor you have in the admin panel web page and when you are done click on the update file button.
And happily you will end up with your modification and NO White Screen Of Death.
I hope you all a bright future with no more WSOD.
UPDATE: through researching and trying more , I found out that editing the files and Encoding it with UTF-8 will lead to the problem to avoide that edit the file and make sure the encoding is either ANSI or UTF-8 without BOM
You should try to run a version of PHP with xdebug installed. A WSOD, that's most likely a PHP parse error. So this isn't really a WordPress problem, it's a PHP problem.
Using xdebug helps, because you'll get a fancy stacktrace in some significant % of the cases where you otherwise would have gotten a WSOD.

Resources