Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

WordPress cookie issue on login: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

The problem was some empty spaces in custom plugin outside of <?php ... ?> enclosure. This is not a specific issue for cookies and the error is misleading. My custom plugin was only a single php file with 2 extra empty lines. The existing popular question about the same error message doesn’t include any answers regarding empty lines. The question is also protected by the community. That is why, I needed to answer in a separate question.

Related Posts:

  1. Trying to set a cookie based on $_POST parameter
  2. Update Code to be Compatible with WP 5.3 (‘cannot modify header information’ warning)
  3. set cookies on certain page only
  4. setCookie before headers are sent?
  5. Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
  6. How does one suppress a 404 status code in a WordPress page?
  7. Admin bar and fixed header issue?
  8. How to remove rest api link: in http headers?
  9. disable wordpress canonical tag meta
  10. Disable h1 and h2 from rich text editor combobox
  11. Recommended location to set response headers?
  12. Is it safe to fix Access-Control-Allow-Origin (CORS origin) errors with a php header directive?
  13. How to set custom cookies before output
  14. Custom endpoint and X-WP-TotalPages (headers)
  15. Getting “Cannot modify header information – headers already sent” error on wp-admin only whenever any plugin is activated
  16. Additional Option on Custom Header admin
  17. How can I use CURLOPT_USERPWD in wp_remote_post?
  18. Putting content into header.php without using wp_head
  19. Setting Last Modified HTTP Header on static Home Page
  20. If Modified Since HTTP Header
  21. Image slider to display at the very top of home page
  22. Remove rel=shortlink from HTTP header
  23. Getting redirect to happen before header output
  24. How do you log a user out with wp_logout?
  25. Indenting (tabbing) WP_head
  26. Change the headers content type with wp_remote_post
  27. Different custom header image on different page
  28. How to get login data (session) outside WordPress?
  29. Why I can’t add a script-code into theme-settings without 403-forbidden?
  30. HTTP Header on specific page is application instead of text
  31. Auto-refresh page every minute?
  32. Is it wrong to put header tags inside WordPress help tabs? [closed]
  33. Authenticate a user for current request
  34. Remove link around logo
  35. Want to make header and footer CMS driven sothat Editors can modify its content from wordpress admin section
  36. Facebook embeds loading the wrong language
  37. Header: Include Date Published and Date Modified
  38. Page source contains an http item that makes page insecure; but in php files it’s written as https!
  39. Cleanup Body_Class
  40. Banner in WordPress
  41. Google Tag Manger – no-script Code Not Found
  42. Determine what pages are in my header [closed]
  43. How to remove main domain header title from after sub domain header title
  44. I want to hide header in the static homepage that I am working on [closed]
  45. Remove all WordPress HTTP headers (not in-source embeds)
  46. WordPress 502 | Header Upstream send too big
  47. Creating dynamic header and footer files
  48. Strange 403 header response
  49. 404 or ugly page on IE, but Firefox, Chrome looks perfect
  50. WP not logging in at first time
  51. Insert custom PHP head above in WP pages
  52. Changing header text from uppercase to normal [closed]
  53. Safe to start a php session on get_header action?
  54. My header not showing up [closed]
  55. Enqueue stylesheet in plugin for wp-login.php
  56. How to Access Script Tags in Header
  57. H1 tags for header image?
  58. Where are my js and css links in header?
  59. Why does WordPress allow inserting tags into posts?
  60. Is there a way to get minimal WordPress functions for iframed content?
  61. Problems accessing stylesheets/scripts loaded in WP header
  62. Rotate images in header based on date
  63. Why does WP load so many files in the head of source code? How do I optimize it?
  64. How to add some lines to the wp-login.php header via functions.php?
  65. How to Customize Wp Default Title and a prefix
  66. Hook to change HTTP response headers
  67. allowed_http_origins() only works in theme functions.php
  68. Insert stylesheet into WordPress header?
  69. Why are tags from the header showing up on my WordPress site? [closed]
  70. How to register and set http/2 server prefetch for a specific asset?
  71. Header with content
  72. WordPress Template not getting my Sub-Header File
  73. Requiring wp-login.php sends headers automatically
  74. How to add social follow button to header? [closed]
  75. Include two headers
  76. Empty header tags [closed]
  77. Insert Facebook button into header [closed]
  78. What is this HTTP_REFERRER “WordPress/4.1.2”
  79. Empty lines in header, how to remove them
  80. Benefits to using CSS for header image instead of html img tag [closed]
  81. Export Header and Footer
  82. Custom headers in WordPress, are there also custom footers?
  83. setcookies and header send
  84. Point get_header() to different plugin
  85. How do I begin debugging where the description meta tag is set for my categories?
  86. How do I get the Social Media Plugin to show up in my Twenty Eleven child theme’s header?
  87. Inserting iframe right after on header.php
  88. How to add script right after ?
  89. Adding more tabs to horizontal navigation bar
  90. Code needs wrapper/container to put footer back in, but where?
  91. Dynamic height in custom header image panel
  92. How can I remove or change the tooltip of an icon
  93. Design Header meta on single posts wordpress
  94. Including PHP files in header.php
  95. How do I modify the tag on my Category Archive page?
  96. Remove a link in the header
  97. Remove server response header
  98. Using a nonce Content Security Policy header for style-src for inline style elements returns errors
  99. How can I use an iframe element as my header media?
  100. How to make my banner (logo image) position on the center
Categories headers Tags cookies, headers, wp-login-form
wp_split_shared_term_batch messing up upgraded ACF 5 data
Can I just insert JavaScript by using ?

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress