• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How To Change Your WordPress URL In The Database

Ryan Gray

Published on: October 16, 2018

Categories: WordPress 5

We frequently get tickets asking us to change the location of WordPress.

If you’re using the Softaculous auto installer it’s not hard to accidentally install WordPress in the /wp folder as that’s the default location.

Some people will simply delete the install and re-install leaving that parameter out:

If that’s not an option for you (i.e. you didn’t use Softaculous to install or you don’t want to remove it) there is a very easy fix to move WordPress.

Move The Location Of The Files

To get started with moving the location of your files, you simply need to login to cPanel -> File Manager:

Once inside, you’ll want to navigate to where the existing WordPress installation is.

Most of the time they’ll be somewhere inside of the public_html folder.  If you left Softaculous defaulted to /wp, they’ll  be in /public_html/wp:

To move them, you’ll click beside the top folder (wp-admin) and hold down the shift key and then click the last file in the list (notice how everything turns blue):

Once selected, you’ll drag them into the location you want, most of the time public_html.

This would look something like this:

Congratulations, at this time you’ve moved your WordPress files successfully!

How To Change The URL In The Database

Once the files are moved, you need to change the location inside the database.

This is so WordPress knows where the files are now located.

To do this, simply login to cPanel -> phpMyAdmin:

Once inside, you’ll click on your database name on the left:

As you can see, my database is called keydiets_wp123.  If you only have one database this is easy, if you have multiple, you may need to open your wp-config.php file and confirm which database you’re using (use cPanel -> File Manager).

Once you have the correct database name, you’ll notice a table called options.  You’ll select Browse beside it:

You will then see the siteurl and home in the option_name column.

Inside each of those, you’ll be able to click the URL and modify it accordingly.

When you click out, it’ll automatically save:

Once your URLs are set correctly, you’re finished:

Congratulations!  Your files have been moved and your new URLs are set!

Generate A New .htaccess File

Finally, you need to have WordPress generate a fresh .htaccess file to ensure it picks up the changes.

To do this, simply navigate to your wp-admin and login (i.e. https://yourwebsite.com/wp-admin).

From the dashboard, hover over Settings -> Permalinks:

Once here, simply click Save Changes and it’ll automatically generate:

Congratulations!  You’ve successfully changed your WordPress URL from inside the database!

How To Change Your WordPress URL

I’ve filmed a video tutorial where I walk through these steps for those that wish to follow-along:

Feel free to reach out to our Superhero Support team if you have any questions!

Ryan Gray

Ryan Gray is the founder and CEO of NameHero, one of the fastest growing independent web hosts in the United States. Ryan has been working online since 1998 and has over two-decades experience in Internet Entrepreneurship.

Related Posts

How To Back Up Your WordPress Site (And Why You Should Do It Today)

In this post, we’ll take a closer look at why backups matter. We’ll also show you different ways to back up your WordPress website.

Joomla vs. WordPress: Which One Is Better?

In this post, we’ll consider five differences between Joomla and WordPress and how you might go forward with setting up a WordPress website.

How To Start A Newsletter In WordPress

Check out our complete guide on why and how you should start your own newsletter in WordPress.

How to Eliminate Render-Blocking Resources in WordPress (& Why You Should)

Many things can slow down your site, including render-blocking resources. These are CSS and JavaScript files that delay the loading of content on your site. As a result, visitors will have to wait longer to interact with your page, which could lead to frustration and instant exits.  So, what can you do to eliminate render-blocking […]

Reader Interactions

Comments

  1. Sherman Sweeney says

    September 25, 2019 at 8:51 am

    Thank You, Mr. Ryan, It’s nice to watch a video and learn at the same time, At least I can do the work for me, and Customer. Thank You Very much and your Team I love Namehero. Someday I go and Visit everyone also bring Pizza.

    Reply
  2. Betsy says

    May 20, 2021 at 3:16 pm

    Thank you for another helpful how-to article, Ryan & NameHero Team! I’ve been so impressed with your tutorials and knowledgebase. So glad I moved to NameHero!

    Reply
    • Ryan Gray says

      May 24, 2021 at 12:12 pm

      You are most welcome! Thank you for your business!

      Reply
  3. Jeremy Bengtson says

    March 7, 2025 at 6:24 pm

    Hey ryan (or whoever monitors this)
    Update your URL list for your help staff.
    Or create a redirect to ensure anyone who has created a bookmark can find this page.
    your old article was https://www.namehero.com/startup/how-to-change-your-wordpress-url-in-the-database/

    Reply
    • John Kirkpatrick says

      March 10, 2025 at 9:22 am

      Hey Jeremy – thanks for reporting. Does it not redirect for you?

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA