Exploring The Internet

Exploring the web – Growing my online experience




How to Rename a Folder Without Much Downtime in Your CPanel?

August 5th, 2009 · No Comments · Blogging Tips, Domain, How to, WordPress Tips



Recently I had to rename a fold from my server’s cPanel due to the reason that the domain used to be there had been transferred. Now the name of that folder does not reflect the new domain’s content. I just want a more appropriate name for that folder so I will not be confused either. However, it just would not allow me to directly rename it from the server. Every time when I attempted to change that folder’s name to something else. It would bring down that website. All I got is this

Not Found
The requested URL /index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

——————————————————————————–

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.mycoolonlinestores.com Port 80“.

I searched the Internet for a solution. Here is the way of how I’ve got it to work. I am sure someone may be interested in this. So why not writing down these steps of how I’ve solved this problem? By the way, the name of the folder I’ve tried to change is associated with a self-hosted WordPress site. And the cPanel is associated with Hostmonster‘s cPanel.

  • First download all the files within that folder to your local computer. I use FTP to get the job done.
  • Next create a new folder in your server with whatever name you’ve preferred and upload those files that you’ve downloaded earlier to this new folder.
  • Next log in to your cPanel and click on phpMyadmin. A new window would pop up. It will allow you to export (backup) your database. See details here. Don’t close this window, you’ll need it later.
  • Now go back to your cPanel. Click on MySQL ® Databases or MySQL ® Database Wizard to create a new database. See this tutorial here. Remember its user name and password.
  • Then open your database you’ve backuped earlier with Notepad editor. Hit Ctrl and F at the same time to bring up a search box. Type in Database and replace old database name with the new one. Also type in public_html and replace old folder name with the new one. Make sure you save it in your new database name.
  • Now go back to phpMyadmin window. The one I told you earlier not to close it. Click on Import to upload your amended database.
  • Then open wp-config.php (should be in the root directory of your new folder). Edit and upload it back to the same place. See details below:

    define(‘DB_NAME’, ‘databasename‘); // Change databasename to be your new database name
    define(‘DB_PASSWORD’, ‘mysqlpassword‘); // Change mysqlpassword to be your new MYSQL password
    define(‘DB_USER’, ‘mysqlusername‘); // Change mysqlusername to be your new MySQL username
    define(‘DB_HOST’, ‘localhost’); // Leave the way it is.

  • Since the domain is assigned to the old folder, there is no way that you can assign it to the new folder. However, you need to click on Domain Manager in your cPanel. Once you are there, tick that domain. On your right side, scroll down to un-assign that domain to your cPanel. Quickly, during this time your website will be down.
  • Finally go back to cPanel and click on Addon Domains. A new page will open, assign that domain to your new folder and hit Add Domain button. See details below:

    Step 1 Tick next to “Use a domain that is already associated with your account”. Scroll down to find it.

    Step 2 Leave it alone.

    Step 3 Tick next to “Addon Domain”.

    Step 4 Tick next to “Use an existing directory”. And below “Sub-domain:” type in your new folder’s name.

Now type your website’s url in your browser. If everything works fine, you should be able to see your website up and running again. Some people might have different approach. Feel free to talk about yours here in comment section. Any other feedback is welcome too.

C++: C++ and Hacking for dummies. A smart way to learn C plus plus and...

$14.71
End Date: Wednesday Jun-28-2017 14:58:58 PDT
Buy It Now for only: $14.71
Buy It Now | Add to watch list

Office 365 For Dummies
$19.77
End Date: Thursday Jun-29-2017 8:52:22 PDT
Buy It Now for only: $19.77
Buy It Now | Add to watch list

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

Tags: ·········

No Comments so far ↓

There are no comments yet...Be the first to voice your opinion by filling out the form below.

Leave a Comment

Your e-mail address will not be published. Required fields are marked *

Comment moderation is in use. Please do not submit your comment twice.

*






Custom Search