• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

<cmiaral: tech blog?>

What works . . . and not.

  • Home
  • About
  • Tools
  • WordPress Resource
  • Contact
You are here: Home / Blogging Tips / WordPress Preview Returns 404 Error

WordPress Preview Returns 404 Error

Updated on June 14, 2019 By Carolyn Leave a Comment

Every time I start a new blog, I start from scratch in a live server.

Finally, I installed AMPPS in my desktop (Windows 10). This setup should boost my productivity . . . until I discovered an error.

After moving my blog from local hosting to a server, I started posting blog post.

The Issue: Whenever I preview the draft, the page return a 404 error (page not found).

How am I suppose to see what my publish post will look like? This is the first time I encountered this issue.

The Cause: I changed the permalink of the WordPress blog in the local hosting.

It’s either I would avoid changing the permalink in local hosting or change the AMPPS setting which I am yet to find out.

How to Fix the WordPress Preview 404 Error

Without editing the code, this error could be fixed. I tried two solutions; the second fixed the issue. You may have to do both to see what works on your blog

Solution #1

  1. Go to WordPress dashboard > Settings > Permalinks.
  2. Choose Plain (or other choices) under Common Settings. then save.
  3. Choose the permalink format that you want then click save. I chose Post name.
  4. Preview a post in a draft to see if the error is fixed.

That’s how simple it is.

WordPress Permalink Settings

If this didn’t work like in my case, try the next solution which is something I tried out of the blue.

Solution #2

My blog’s url has https:// done through Let’s Encrypt. When I moved my blog in the server the URL has http:// instead.

  1. Go to WordPress dashboard > Settings > General.
  2. Check the WordPress Address (URL) and Site Address (URL). I changed the http:// to https:// then save.
  3. Follow the steps in Solution 1.

This solved the issue in my case. I stopped seeing 404 Error whenever I preview a draft.

WordPress General Settings

Related: How to Install WordPress in a Directory (in a Different Folder)

The important thing to remember is to be consistent with the URLs.

Whether you are still using http (really, why?) or https, make sure that the URLs in General Settings matches in Permalinks.

And use https. It’s easy and free to set up with Let’s Encrypt. Check your hosting if it’s available or use a similar feature paid or free. Encrypt your site no matter what.

Having the same issue? Did it work or were you able to solve the issue with different solution?

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to email this to a friend (Opens in new window)
  • Click to print (Opens in new window)

Related

« How to Install AMPPS on Windows 10
How to Find Broken Links Using Screaming Frog »

Filed Under: Blogging Tips, WordPress Tagged With: local hosting

About the Author

Carolyn loves to learn new things that involve technology, mostly about the Internet. If not blogging, she's in the kitchen trying to (at least) make edible vegetarian meal. A toast is always a lifesaver. Connect with her on Twitter and LinkedIn.

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

SUBSCRIBE

Enter your email address to subscribe to cmiaral.com and receive notifications of new posts by email.

ADS

POPULAR POSTS

  • My Attempt to Fix Boot Device Not Found on HP Stream Laptop
  • How to Change the Aspect Ratio of Sony a6000
  • Should You Buy the AmazonBasics 50-Inch Tripod?
  • Taking Many Shots with EV Bracketing on Sony a6000
  • B046 Jelly Comb Bluetooth Keyboard and Its Annoying Glitch

TOPICS

  • Blogging Tips
  • Books
  • Coding
  • Gadgets
  • Hardware
  • Photography
  • Productivity
  • Social Media
  • Software
  • WordPress

COMMENTS

  • Collins PEREIRA on My Attempt to Fix Boot Device Not Found on HP Stream Laptop
  • Carolyn on Tzumi Bluetooth Keyboard with Folio Case, an iPad Mini 2 Accessory
  • FOSU FREDERICK on Tzumi Bluetooth Keyboard with Folio Case, an iPad Mini 2 Accessory
  • Hassan Rabiu on My Attempt to Fix Boot Device Not Found on HP Stream Laptop
  • Karamveer on How to Open Atom in Git Bash (Windows 10)
CMiaral · Copyright © 2016-2022 · Genesis Framework · WordPress
  • Home
  • About
  • Tools
  • Contact
  • Site Map
  • Disclaimer
  • Privacy Policy
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.