Wednesday, 24 November 2021

How to Create Anchor Links in WordPress (3 Methods)

Google loves long-form content, and as a result, lengthy articles tend to rank higher on search results pages. The problem is that readers’ attention spans are getting shorter even as search algorithms favor longer content. This means that if you want visitors to find the information they need within your posts and pages, you have to make it easy for them.

That’s where anchor links come in. With this feature, you can send readers toward specific sections (or subheadings) within the same page, often by using a table of contents. That way, visitors can find the exact answers they’re looking for instead of skimming through hundreds or thousands of words.

In this article, we’ll show you how anchor links work and discuss the pros and cons of using them. Then we’ll go over some best practices for using anchor links in WordPress and show you three different ways to add them. Let’s get to work!

What Anchor Links Are

In theory, an anchor link is any link within a page that points to another section on that same page. In most cases, you’ll encounter anchor links within a table of contents at the start of a page or post.

A table of contents.

Above you’ll see an example taken from one of our own articles, which covers how to start a blog step by step. It’s a lengthy process, which makes a table of contents with anchor links an essential component.

Other common examples of anchor links include buttons that return you to the top of the page when you reach the bottom. You can also use anchor links to help users navigate long landing pages. Whether there’s a page or post on your website that’s a bit too long for manual scrolling, anchor links can improve the user experience.

WordPress + DreamHost

Our automatic updates and strong security defenses take server management off your hands so you can focus on creating a great website.

The Pros and Cons of Using Anchor Links in WordPress

There are very few downsides when it comes to using anchor text and links in WordPress. Overall, WordPress anchor links make your content easier to navigate. They also offer a host of other benefits. For example:

  • Readers can get a quick overview of your content.
  • Search engines love lists that sum up a post or page.
  • Anchor links can help reduce your website’s bounce rate.

Let’s dig a bit deeper into those last two advantages. It’s important to note that anchor links don’t improve your search engine rankings directly. However, they do provide more context for search engines.

For example, here’s what you’ll see if you Google “how to start a blog with DreamHost”:

A featured snippet in Google.

This is a “rich snippet” that includes part of the post’s table of contents, which is made up of anchor links. The snippet doesn’t include the links themselves, but this list helps the blog post demonstrate how comprehensive it is to both search engine bots and human searchers.

In some cases, Google may actually include anchor links below the meta description within Search Engine Results Pages (SERPs).

A search result including anchor links.

Additionally, providing anchor links in the form of a table of contents can help reduce your website’s bounce rate. That’s because you’re making life easier for users who might access the page, assume that it’s not what they’re looking for because they don’t see what they want right away, and leave. Instead, you can keep them around much longer by telling them exactly what they can find within a post or page and linking them to specific sections.

Overall, tables of contents are the best way to leverage anchor links on your website. However, it only makes sense to use anchor links for long pages or blog posts. There’s no hard-and-fast rule, but anything above 1,500 words or so can likely benefit from a table of contents and its corresponding anchor links.

Adding anchor links to shorter content isn’t necessarily bad, but it can be less useful. If readers can scroll through the entirety of a page in one or two wheel turns, there’s little benefit in spending the time to add anchor links.

How to Create Anchor Links in WordPress (3 Methods)

Creating anchor links is remarkably simple. You can do so either manually or with the help of plugins. Let’s start by talking about how to add anchor links in WordPress using the Classic Editor.

1. Manually Create an Anchor Link Using the Classic Editor

If you’re still using the Classic Editor, you’ll be happy to know that it makes short work of creating anchor links.

As we mentioned earlier, anchor links point toward specific sections on the same page. However, you can’t simply add a link in WordPress that points toward a phrase or a title and hope the editor knows how to interpret it. That’s because all of the text you see in the editor is powered by HTML.

To create an anchor link, you first need to set an anchor. To do that, select a subheading that you want to link to, and switch to the Text view of the editor.

A subheading within the WordPress code editor.

In our example, we’ve selected the following H2 subheading:

<h2>How to Fry a Fry</h2>

What we need to do is add an HTML ID. That ID will be the “anchor” we’re going to link to later on and will be in the form id= “unique-anchor-name”. Here’s what that code should look like:

<h2 id=“fry-a-fry”>How to Fry a Fry</h2>

Once the ID is in place, you can add the anchor link to your table of contents (or wherever else you want to place it). In our example, we want to add the link to the first entry in our table of contents.

You can do this within the Text view or the Visual tab. If you’re using the visual editor, simply add the link as normal. However, instead of an URL, you’ll need to specify the HTML ID you’re linking to, preceded by a “#”.

Adding an anchor link in WordPress.

That’s it! When users click on that link within the table of contents, their browser will jump to the corresponding section.

In the Text view, here’s what the HTML for a table of contents full of anchor links will look like:

Multiple anchor links in a table of contents.

Manually creating HTML anchor links may seem intimidating if you’re not used to working with code. However, as you can see, adding anchor tags is remarkably simple. Once you know how the process works, adding these links manually should only take seconds.

However, keep in mind that you can only point toward anchors on the same page. If you try to create a link toward an anchor ID located on another page or post, it simply will not work.

2. Manually Create an Anchor Link Using the Block Editor

Creating anchor links using the Block Editor is even easier than with its Classic counterpart. That’s because the Block Editor enables you to add HTML anchors or IDs without the need to switch over to the code view.

As with the previous method, the first thing you need to do is add an HTML ID or anchor to the text you want to link to. Select the text in the Block Editor, and open the Advanced tab within the Block section to the right.

Adding an HTML anchor using the Block Editor.

You’ll see a field called HTML anchor. All you need to do is add some unique anchor text within that field, and you’re ready to create the link. Select the text where the anchor link will go, and click on the option to add a link.

Adding a link using the Block Editor.

Instead of a regular URL, add a link that looks like this:

#anchor-text-goes-here

The link won’t work if you forget to add the “#” sign before the anchor text. Confirm the link, and that’s it.

Adding an anchor link using the Block Editor.

The Block Editor can automatically recognize if a link points to an internal or external page. If it recognizes the anchor text you enter, it will automatically display it as an internal link, as shown in the screenshot above.

All that’s left to do now is repeat the process as many times as you need, depending on how many sections you want to link to. The Block Editor allows you to do this in a matter of minutes, which is perfect if you deal with long-form content on a regular basis.

3. Create an Anchor Link in WordPress Using a Plugin

It shouldn’t come as a surprise that there’s more than one plugin you can use to add anchor links in WordPress. So instead of recommending a single option, we’ll show you how to use two plugins, one geared toward simple anchor links and the other designed for building tables of contents.

Let’s start with the former. The Advanced Editor Tools plugin is a tool that adds a broad range of features to both the Classic and Block Editors.

Add Anchor Links Using the Advanced Editor Tools Plugin

The Advanced Editor Tools plugin.

However, it’s worth noting that this plugin only offers an option for adding anchor links in the Classic Editor.

To see that feature in action, open the Classic Editor and select the text you want to add an HTML anchor to. You’ll see a new menu on top of the default Classic Editor formatting options. Select Insert and click on Anchor.

Using the Advanced Editor Tools to add an anchor ID.

That option will open a simple pop-up, which you can use to specify the anchor ID you want to use.

Adding an HTML anchor using a plugin.

Click OK, and you just added an HTML ID in the Classic Editor without needing to tinker with code.

Now, go ahead and add a link that points toward this anchor anywhere you want within the same page.

Adding an anchor link in WordPress.

Advanced Editor Tools adds plenty of other features to the Classic Editor. You can read about them on the plugin’s official page. For now, let’s explore a different approach to adding anchor links in WordPress using plugins.

Create a Table of Contents Using the Easy Table of Contents Plugin

Creating a table of contents for each of your posts can be a lot of work. You have to add multiple anchor IDs manually and create links one by one. Moreover, you might also want to style the table of contents so it doesn’t look like a regular list within a post.

One way to tackle that process more efficiently is by using a plugin such as Easy Table of Contents. This plugin can help you automatically generate tables of contents for posts and pages within your website.

The Easy Table of Contents plugin.

After you activate the plugin, you’ll need to configure its settings. Go to Settings > Table of Contents, and look for the section that says Enable Support at the top of the page. By default, the plugin will only work for pages, so you may want to enable its functionality for posts as well.

Configuring the Easy Table of Contents plugin.

Now scroll down to the Position and Show when settings, which are right next to each other. The Position setting will enable you to decide where to display your tables of contents. By default, they’ll show up on posts and pages right before the first heading.

Configuring where to display your table of contents.

The Show when setting lets you decide how many headings a post or page needs for the plugin to display a table of contents. By default, the plugin sets that number to four, but you can change it.

Deciding how many subheadings a post should include to display a table of contents.

Once you configure those settings, save your changes and go to the post or page where you want to add the table of contents. Open the Block Editor and scroll down to the bottom of the page. There you’ll see a new section called Table of Contents. There should be an option at the top to insert a table of contents for that post or page.

Adding a table of contents to a post using the Easy Table of Contents plugin.

The plugin will automatically set anchor IDs and generate a full table of contents leading to them. That table will include any subheadings within the post or page that you add it to unless you choose to exclude some of them.

A table of contents generated using a plugin.

Although the plugin includes an option for adding tables of contents automatically, we recommend that you decide which posts to use it for manually. This only takes a second, and you’ll avoid generating tables of content for posts or pages that don’t need them.

Finally, if you’re not happy with the plugin’s default style for its tables of contents, you’re free to change it. The plugin’s Settings screen includes several options for modifying the appearance of its tables.

You Dream It, We Code It

Tap into 20+ years of coding expertise when you opt for our Web Development service. Just let us know what you want for your site — we take it from there.

Check Out Our Other WordPress Tutorials

If you want to learn more about improving the WordPress user experience and your site’s SEO, here are a few additional tutorials you may want to check out:

Using anchor links is just one of the many tricks you can implement to improve your website’s search engine rankings. The more you understand SEO, the easier it will be to create search-engine-friendly content from the moment you publish it.

Conclusion

Anchor links are incredibly useful elements for helping users navigate complex pages and long-form content. You can use anchor links in tables of contents, navigation menus, footnotes, and more.

Most importantly, WordPress makes it incredibly simple to add anchor links to your content. Let’s recap the three ways you can add anchor links in WordPress:

  1. Add anchor links manually using the Classic Editor.
  2. Add anchor links manually using the Block Editor.
  3. Create anchor links using plugins such as Advanced Editor Tools and Easy Table of Contents.

Are you looking for a WordPress host that can help you serve long-form content to thousands of visitors without slowing down your site? DreamHost plans are designed to handle large amounts of traffic while keeping your website fast. Check out one of our WordPress hosting packages today!

The post How to Create Anchor Links in WordPress (3 Methods) appeared first on Website Guides, Tips & Knowledge.



source https://www.dreamhost.com/blog/how-to-create-anchor-links-wordpress/

Thursday, 18 November 2021

9 Important LGBTQ+ Innovators Who Changed STEM Forever

It’s a fact: LGBTQ+ people have helped shape the world —  from helping us defeat infectious diseases such as typhoid and tuberculosis to playing a role in defeating the Nazis in World War II.

Although the LGBTQ+ community might not always seem visible in STEM professions, they have always been present. It is worth remembering that people hid their gender or sexual orientation for many centuries to avoid social exclusion, harassment, or even prison sentences.

Even when they didn’t hide their identity, genderqueer and bisexual innovators were — and still often are — incorrectly labeled, while asexuality is regularly misinterpreted as shyness, piousness, or academic devotion. This means we can expect many more of our STEM pioneers to have been LGBTQ+ than just the ones we know about.

We’ve previously shared tips for designing a more inclusive website for LGTBQ+ readers, and today, we’re exploring some of the significant LGBTQ+ innovators who’ve left a mark on STEM fields. Want to jump ahead to a particular person? Just click on one of the links below:

  1. Jemma Redmond
  2. Nergis Mavalvala
  3. George Washington Carver
  4. Alan Turing
  5. Sara Josephine Baker
  6. Alan Hart
  7. Audrey Tang
  8. Paul Erdős
  9. Florence Nightingale

Create a Website for All

With automatic updates and strong security defenses, DreamPress takes server management off your hands so you can focus on what really matters: creating a site that can be enjoyed by every user.

1. Jemma Redmond

Image Credit: www.independent.ie

Jemma Redmond was a pioneer in 3D bioprinting with a dream of printing human organs from donors’ or patients’ own cells. She discovered a way to keep cells alive as they were being printed.

What’s more, she designed a robotic hand that could work with 10 materials simultaneously. This meant it could print more complex tissues — crucial for human organs containing blood vessels.

She was intersex and infertile and hoped to one day print functioning uteri. In a humorous response to those who considered bioprinting complex parts impossible, one of the first things she printed was an extended human middle finger as part of her master’s thesis at University College Dublin in Ireland.

Redmond also did a lot for accessibility. She was a mentor to other tech and STEM professionals and used open source software and affordable parts to make her bioprinters significantly less expensive. She wanted there to be a bioprinter in every hospital and university in the world.

You can read more about Redmond’s life and accomplishments in The Guardian and Making Queer History.

2. Nergis Mavalvala

Image Credit: Dawn.com

Pakistani-American Nergis Mavalvala is an astrophysicist whose groundbreaking work has helped confirm part of Einstein’s theory of relativity.

Having grown up in Karachi, Mavalvala is an immigrant, working mother, and an out lesbian. Her career started early — she worked as a substitute math teacher while still in high school before going on to study at MIT.

In recent years, she was part of the team that first detected gravitational waves, also known as ripples in the fabric of spacetime, caused by black holes. The project was awarded the 2017 Nobel Prize in Physics.

Mavalvala specializes in quantum measurement science and was a 2010 recipient of the prestigious MacArthur Fellowship, or “Genius Grant.” Today, she is the Dean of MIT’s School of Science.

You can read more about Mavalvala’s experiences in an interview with LGBTQ Nation.

3. George Washington Carver

Image credit: Dbg.org

George Washington Carver was enslaved at birth. As an African American child and young adult, he faced academic exclusion for his race. Nevertheless, Carver became an innovative agricultural scientist, researcher, and environmentalist who did important work on crop rotation and product development despite these barriers.

He attended Iowa State University as the college’s first Black student and soon became the first African American awarded a Bachelor of Science. He then went on to achieve a master’s degree in Agriculture.

Carver taught southern U.S. farmers to use crop rotation to restore the nutrients in the soil depleted by years of growing cotton. He encouraged them to rotate cotton with peanuts, peas, sweet potatoes, and other soil-enriching crops.

To make this financially viable for farmers, Carver also developed alternative uses for these products. He invented over 300 peanut-based products, including milk. In response to this and Carver’s artwork, TIME Magazine called him “the Black Leonardo.”

Although his sexuality has been questioned, many consider Carver to have been bisexual. There were rumors about his sexuality at university due to his affectionate friendships and physical closeness with other men. He never married but dated one woman for three years. In later years, he was particularly close with fellow scientist Austin W Curtis Jr.

You can read more about George Washington Carver’s accomplishments on History.com.

4. Alan Turing

Image Credit: wikipedia.org

Alan Turing is one of the world’s most famous mathematicians and cryptographers, having invented the bombe machines that broke Nazi codes during World War II. He is often considered the father of modern computing.

Historians calculate that Turing’s help with code-breaking efforts shortened World War II by two to four years in Europe, potentially preventing Hitler from winning the war. In particular, breaking the German Enigma code allowed ships to deliver supplies to Great Britain while avoiding U-boat attacks.

Yet Turing’s achievements weren’t reserved only to wartime: He published seminal academic papers, such as Turing’s proof, which showed that some yes-no questions cannot be answered correctly by computation. He also theorized about Artificial Intelligence and created the Turing Test to determine whether a computer can think.

Turing was openly gay and criminalized for his sexuality during his lifetime. After admitting in court to having sex with another man, he was chemically castrated for 12 months. In 2009, public demand led then-Prime Minister Gordon Brown to apologize for the government’s treatment of Turing, stating, “We’re sorry, you deserved so much better.” Queen Elizabeth II officially pardoned Turing shortly afterward.

Today, Turing is a celebrated icon in the United Kingdom. He is even on the U.K.’s £50 note, the largest denomination in existence in the country.

You can read more about Alan Turing’s story in the New York Times’s Overlooked series.

5. Sara Josephine Baker

Image credit: www.them.us

Sara Josephine Baker was the first woman in the U.S. to receive a doctorate in public health. Her child welfare innovations are credited with saving the lives of thousands of children in the poorest areas of New York.

She invented a safe infant formula, allowing women to go back to work; an eye drop system that protected infants from gonorrhea and potential blindness; and licenses for midwives. As the first director of New York’s Bureau of Child Hygiene, she nearly halved the child mortality rate. And when she died, the local press reported that she had saved probably 90,000 infants’ lives.

What’s more, when typhoid spread through New York, Baker helped identify the super-spreader woman behind the outbreak. She then tracked her down with police to take and test samples.

Her long-term, romantic relationship with writer Ida Wylie was well-known, and the two regularly attended Greenwich Village’s feminist club, Heterodoxy.

You can read more about Sara Josephine Baker via the BBC.

We Support Your Dream

Whatever your online goals, we’ll be right there with you, making sure your site is fast, secure, and always up. Plans start at $2.59/mo.

6. Alan Hart

Image Credit: www.tekcrispy.com

Alan Hart pioneered the use of x-rays to screen for tuberculosis, allowing doctors to detect the infectious condition before complications developed. In doing so, he saved thousands of lives, both among the patients who survived and those who were consequently not exposed to an asymptomatic carrier of the disease.

Throughout his life, Hart campaigned for further tuberculosis research funding and economic support for patients and constantly challenged the stigma attached to the disease. He also wrote multiple novels featuring LGBTQ+ characters.

Hart, who was assigned female at birth, was one of the first men in the U.S. to have a hysterectomy. Although his trans identity led to discrimination and negative press at the start of his career, he became well-known for his work in later years. At the time of his death, he was married to his second wife and had an illustrious career behind him as a researcher, academic, and public health official.

You can read more about Alan Hart in Scientific American.

7. Audrey Tang

Image Credit: www.innovatorsmag.com

Audrey Tang is the Digital Minister of Taiwan and the force behind Taiwan’s tech-based COVID-19 response. This response includes promoting an open source website for finding shops with masks in stock, developing a vaccination reservation system, and creating a contact tracing system that allows users to remain anonymous.

Tang has publicly credited their department’s prior experience with HIV-positive communities for the success of their COVID-19 response, explaining that no identifying data is sent to the central government. Instead, the system uses codenames, single-use emails, and other tools to keep people’s information private.

Even before the pandemic struck, Tang was well-known as a tech innovator in Taiwan thanks to their impressive programming skills, political career, and advocacy of the g0v movement: an open source, open-government collaboration that promotes transparency. They describe themselves as a civic hacker and believe technology and democracy can go hand in hand.

Tang is a post-gender, nonbinary trans person and does not identify with any pronoun, instead inviting people to use any pronoun they wish.

You can read more about Tang and their thoughts on tech in this interview.

8. Paul Erdős

Image Credit: www.eitb.eus

Thanks to the extensive number of problems he solved, Hungarian mathematician Paul ErdÅ‘s is considered one of (if not the most) prolific mathematicians of the 20th century. He’s famous for his work in number theory and combinatorics, as well as his deep interest in prime numbers.

A mathematical genius from a young age, Erdős discovered negative numbers by himself when he was only four years old. At 21, he earned a Ph.D. in Mathematics. Among other achievements, Erdős co-founded probabilistic number theory and the prime number theorem.

Paul ErdÅ‘s was devoted to math problems and spent up to 20 hours a day working on them. Throughout his life, he constantly chased the shortest proof. He was also generous in supporting other mathematicians: in 1984, he won the Wolf Prize and used nearly all of the $50,000 prize money to establish a scholarship in his parents’ names.

Born in the 1930s of Jewish heritage, ErdÅ‘s was disturbed by the rise of antisemitism in his home country. And so, he became a lifelong traveler, nomad, and immigrant. ErdÅ‘s would often turn up at a friend’s house and stay until they ran out of math problems to solve.

Paul Erdős was asexual and likely aromantic, with no interest in sex. This led The New York Times to dub him The Man Who Only Loved Numbers, despite his active social life and many friends and collaborators.

9. Florence Nightingale

Image Credit: www.wikipedia.org 

The so-called “Lady with the Lamp,” Florence Nightingale is considered the founder of modern nursing. She revolutionized healthcare by insisting on good hygiene, record-keeping, and patient dignity, arguing for important yet overlooked ideas like patients being able to see the person treating them.

In addition, Nightingale was a statistical pioneer who collected extensive data to prove that poor conditions in hospitals were killing soldiers. She also invented the polar area graph and several other histograms to help politicians understand her data analysis charts. In 1858, she became the first female member of the Royal Statistical Society.

Nightingale also struggled with her own ill health and lived with disabilities and likely mental illnesses. From her late thirties to her sixties, she was mostly bedridden.

Nightingale’s sexuality is fiercely debated. In search of a definitive answer, academics have pored over her letters, which contain quotes such as, “I have never loved but one person with passion in my life, and that was her,” and, “I have lived and slept in the same beds with English Countesses and Prussian farm women. No woman has excited passions among women more than I have.”

Florence Nightingale turned down numerous marriage proposals throughout her life, instead maintaining close friendships with people of different genders. As a result, some have interpreted her as asexual, others as a lesbian, and others have claimed she simply did not want to give up her career for marriage.

We will probably never know all the details of Nightingale’s sexuality or personal life, but for now, you can read more about her on Making Queer History.

The post 9 Important LGBTQ+ Innovators Who Changed STEM Forever appeared first on Website Guides, Tips & Knowledge.



source https://www.dreamhost.com/blog/lgbtq-innovators-who-changed-stem-forever/

Tuesday, 16 November 2021

How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods)

WordPress is the most popular Content Management System (CMS) online, with an estimated 62% of the CMS market share. Despite this, it isn’t perfect and can trigger some issues. For example, you may need to deal with the “WordPress keeps logging out” problem.

Fortunately, there are many ways to ensure that being automatically logged out doesn’t happen so often. You can troubleshoot the problem by trying various possible solutions, such as clearing caches and disabling plugins. It can be a long process, but eventually, you can find out what is causing the issue.

In this article, we’ll look at the most common reasons why WordPress keeps logging out. Then we’ll explore eight methods you can use to solve the issue. Let’s get started!

Why WordPress Keeps Logging Out

WordPress requires you to enter your username and password when you want to access your website’s dashboard. This system prevents unknown users from reaching your website and potentially stealing your data.

However, when working on your website, you’ll likely want to keep your administrator dashboard open. If WordPress keeps logging you out, it can become frustrating to continually sign in to access your content.

There are various reasons why WordPress might log you out, such as:

  • Cookies with outdated information
  • Cached files with old data
  • An improperly configured WordPress site address
  • Faulty plugins or theme files

We’ll address each potential cause for the “WordPress keeps logging out” problem in our walkthrough. We’ll also explore fixes for each scenario.

Skip the Stress

Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods)

There are multiple ways to fix the “WordPress keeps logging out” problem. We’ll start by addressing the easiest ones and work our way up to the more complex methods.

1. Clear Your Browser’s Cookies

You can start by clearing all of the existing WordPress-related cookies from your browser. Cookies store information from previous browser sessions, such as login details and personal data. However, if they hold onto outdated data, they can trigger the logging out error.

The process is similar with all major browsers. However, we will show you how to do it in Chrome.

Go to the WordPress site URL in question, and click on the padlock icon to the left of the URL bar. You will then see a small box pop up.

Clearing browser cookies for a particular site.

As you can see, the browser says there are 19 cookies stored in the browser for this domain. To remove them, click on Cookies, and you will see another popup box.

Viewing cookies in use for a website in your browser.

Highlight the domains shown in the Allowed box and click on Remove at the bottom. When the domains disappear, select Done to save your changes.

Now restart your browser and try logging into WordPress again. A new cookie will be set if you click on the Remember Me box.

To find out how long until Chrome expires the cookie, just go to the Settings menu again. You can access it by clicking on the three vertical dots in the top-right corner of your browser.

Accessing browser settings with Google Chrome.

In the settings, click on Privacy and Security in the left-hand sidebar. On the right-hand side, you will then see an option called Cookies and other site data. Select it.

Accessing browser privacy and security settings in Google Chrome.

Scroll down the page until you see “See all cookies and site data.” Click on it.

Seeing all cookies and site data in Google Chrome browser settings.

You’ll now get a list of all the cookies on your computer. Use the search box at the top to find the one you’re looking for. Just type in the domain, and Chrome will show you what it has in storage.

Clearing all cookies and site data in the Google Chrome browser settings.

Click on the first result, and you’ll get a list of each cookie. Select the cookie name and scroll down right to the very bottom, where you will see the expiry date.

Viewing the cookie expiry date in Google Chrome.

As you can see, this cookie is valid for just over three months. It even includes the expiration time, so you know when your cookie will need a replacement.

2. Clear Your Browser’s Cache

If the logging out problem persists, it’s time to check your cache. A cache is a saved version of a website. Your browser uses this method to store information so pages will load faster when you next visit the site.

However, if the page is cached in the browser along with an expired cookie, it will likely keep logging you out. As such, you’ll need to clear out the stored information.

Again, clearing a cache is very similar with all major browsers, so we will focus on the most popular option: Chrome. Go to Chrome’s settings by clicking on the three vertical dots in the top right corner of the browser.

When the menu drops down, choose More Tools > Clear Browsing Data.

Clearing browser data in Google Chrome.

Choosing Clear Browsing Data brings up this box:

Clearing cached images and files in Google Chrome.

Tick Cached images and files and click on Clear data. When the box disappears, restart your browser. As you can see, you can also remove the browser cookies using this method.

3. Check Your Browser Settings

The logging out problem can also come from your browser settings. For example, if your browser forces cookies to expire, it will forget your login information. Therefore, it will require you to log back in continuously.

You’ll need to reaccess your browser settings as you did in the first step of this tutorial. Navigate to Settings > Privacy and Security > Cookies and other site data. Here, you can see if any cookies are blocked or enabled.

General settings for cookies in Google Chrome.

For example, you can see cookies are disabled during Incognito mode in our browser. However, there are also Block third-party cookies and Block all cookies options. If either of these are enabled, they could be interfering with your WordPress session and logging you out.

If this is the case, select Allow all cookies by clicking on the button next to it. Now your browser will save the cookie for your WordPress login session.

4. Clear Your WordPress Site’s Cache

If you’re using a WordPress caching plugin, this add-on could be at fault. For example, it could be storing an outdated version of your site, triggering the “WordPress keeps logging out” problem.

Site caches can be handy to have, especially if you have a high-traffic website. Still, they have the potential to cause problems down the line.

If you have a site caching solution installed, there is usually an option in the WordPress dashboard to clear the cache with one click. It sits in the top menu and generally says Delete Cache[a][b][d](Note: If you are using the Proxy Cache Purge plugin, you will also see this option, but deleting its cache will not fix the logging out issue.)

The Delete Cache button in the WordPress admin dashboard.

Once you click on this button, WordPress will direct you to your caching plugin. You can then click on Delete Cache or the specific control button for your software.

The plugin may also ask you to confirm your choice or choose specific cache elements to purge. You can clear all of the stored items. When you reload your WordPress site, it will automatically generate a new cache.

5. Double-Check Your WordPress Site Address

In your WordPress site settings (under General), you can set the site URL to either “http://www.yourdomain.com” or “http://yourdomain.com”. Some people prefer not having “www” before their domain name for branding reasons or to make their URLs easier to type.

The WordPress address URL and site address URL.

However, if these two addresses don’t match, WordPress may see the discrepancy and log you out by default. So, you’ll need to solve the issue to prevent the “WordPress keeps logging out” problem.

To fix the discrepancy, you’ll need to edit your wp-config.php text file. This document contains vital information for your WordPress website, such as its database connection details.

You can access this file using a Secure File Transfer Protocol (SFTP) client. One of the most popular options is the free FileZilla program. If you’re a DreamHost customer, you can also use our secure WebFTP program.

Start your SFTP client and look for the wp-config.php file. You can find it in the root directory of your domain.

Open the file and paste the following code into it. You’ll want to swap out the example text for your own domain names:

define( 'WP_HOME', 'http://example.com' );

define( 'WP_SITEURL', 'http://example.com' );

Now save the file and close your SFTP client. After that, you can go back to your WordPress dashboard to check if the problem is resolved.

Easily Build Your Dream Website

Don't know code? No problem. Our DIY Website Builder makes building a website as easy as sending an email.

6. Disable and Re-enable WordPress Plugins

Still no luck fixing the “WordPress keeps logging out” problem? Not to worry, there are a few more things you can try. The next troubleshooting step is checking for a plugin conflict.

A plugin is an add-on that you have installed on your WordPress site. You may have sourced it from the Plugins section on your site or through the WordPress plugin directory.

However, many plugins use cookies to function on your site. If these cookies have expired, they might trigger the logging out problem.

Additionally, poorly-coded plugins could interfere with your WordPress site. As such, you’ll need to identify if any add-ons are causing login or logout issues.

If you only have a few plugins, this will be an easy process. However, if you have many add-ons, this is going to take a while!

You can deactivate plugins by heading to Plugins > Installed Plugins in your WordPress dashboard.

Accessing plugins from the WordPress dashboard.

Tick the box next to Plugin and access the drop-down Bulk actions menu. Choose Deactivate and then Apply. This process will deactivate all your plugins.

Deactivating plugins in bulk can help with the "WordPress keeps logging out"problem.

Now you’ll need to reactivate each plugin and test to determine if it is the issue. You can do this by enabling them one at a time, logging back into your WordPress dashboard, and checking to see if they trigger the problem.

If you find the culprit, you’ll want to delete it from your website. You may even want to contact the relevant developer to let them know their add-on is functioning incorrectly.

However, suppose the logging out problem prevents you from accessing your Plugins dashboard. In that case, you can complete the process with an SFTP client. First, you’ll need to open up your website’s wp-content folder and look for Plugins.

Accessing the wp-content folder from an SFTP client.

Deactivate all your plugins by renaming the folder to something like “plugins_old”. Then you can navigate back to your WordPress dashboard and follow the manual process we described before.

7. Check for Theme Conflicts

The next possibility is a poorly-coded theme. WordPress has many high-quality themes available.

However, as an open-source CMS, any developer can create a theme. Therefore, a poorly-coded one can slip through the cracks. It can then cause issues on your site, such as the “WordPress keeps logging out” problem.

Every WordPress installation comes with the pre-installed Twenty Twenty-One theme. So you can quickly and easily check for a theme conflict by reverting your site to this default option. Then, you can determine if your previous choice was causing the logging out issue.

To switch themes, go to Appearance > Themes in your WordPress dashboard. You will then see your available options, including the Twenty Twenty-One theme.

However, if you deleted this theme, you can reinstall it for this tutorial. Type the name into the search box and select Twenty Twenty-One.

Accessing themes from the WordPress dashboard.

Mouse over the Twenty Twenty-One theme and click on the Activate box that appears.

Switching to the default Twenty Twenty-One theme could help with the "WordPress keeps logging out" problem.

The site will now switch to the Twenty Twenty-One theme. Now log out and back into WordPress and see if that fixed your problem. If it does, you might want to think about changing your theme to something else.

To avoid installing poorly-coded themes, you can read the reviews from other users. Just go to the WordPress theme directory and search for the name of the theme.

On the right-hand side, you’ll see the theme’s star rating, which will give you a quick overview of its popularity.

The star rating for a WordPress theme.

Now click on the See all link at the top to read the reviews.

Reviews for WordPress themes.

You should also continually monitor your Updates section in WordPress to see if your theme has a new version available. Doing this will ensure that you get all the latest security updates and bug fixes. You can find updates at the top of your left-hand sidebar.

Accessing updates in the WordPress dashboard.

By installing all updates and double-checking the safety of a theme before you install it, you can avoid using a poorly-coded option.

8. Contact Your Hosting Provider

By now, you’ve likely discovered what was causing your WordPress logging out problem. However, in the improbable event that it is still happening, you may need to contact your web hosting provider for assistance. The issue may be a domain or server misconfiguration.

If your hosting company is DreamHost, just get in touch with our customer support team! They will be more than happy to help you solve the problem.

You’re Cordially Invited

Join DreamHost’s Facebook group to connect with like-minded website owners and get advice from peers and experts alike!

Fixing Other WordPress Problems

If you’re running into any other issues with your WordPress site, we have a comprehensive list of troubleshooting tutorials:

If you need further assistance, you can check out our WordPress tutorials. These expert guides can help you master your admin dashboard in no time!

Conclusion

The “WordPress keeps logging out” problem can be frustrating. But as we’ve just seen, you can use multiple troubleshooting methods to identify and solve the issue.

By following the list we have provided here, you can start with the most straightforward possibilities and gradually work your way up to the more time-consuming ones. For example, clearing caches and cookies takes less than a minute. However, individually checking plugins can eat up a lot of time.

Are you looking for a WordPress host that can help you out with any technical problems? At DreamHost, we have a support team that can walk you through any website-related issues. Check out one of our WordPress hosting packages today!

The post How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods) appeared first on Website Guides, Tips & Knowledge.



source https://www.dreamhost.com/blog/how-to-fix-wordpress-keeps-logging-out-error/

Creating and Mastering GA4 Explorations

In the switch from Universal Analytics (UA) to Google Analytics 4 (GA4) — which will go fully into effect July 2023 — a lot of things have...