Are You Moving WordPress From One Folder To Another?
July 23rd, 2016 | by Ravi Chahar || 10 Comments |
If you are moving WordPress from one folder to another folder then you should know the perfect way to complete the action. After starting your blog, you feel the need to place all the WordPress files in the different folder. Do you know how to move WordPress from one folder to another?
You can’t take the risk while doing such things. So make sure that you have the backup of your website and the database on your hard drive. It is necessary to have the secure side for your website. In this post, I am going to show you the perfect way to move files from one folder to another.
How To Move WordPress From One Folder to Another?
Are you running multiple websites on one account? Are you thinking about creating the static home page for your website and the blog option to place the content of your website? You need to check the location of the WordPress files in your cPanel.
After that, the files should be moved from that location to another location. It can be done simply by copying the files and placing in the new folder. Let me show you the practical:-
Moving WordPress From One Folder To Another:-
Step 1:- Login to your cPanel and go to “file manager” under the “files” section. Make sure that you have checked to show the hidden files. It’s because you won’t be able to copy the hidden files like .htaccess if you unchecked it.
Step 2:- If all the WordPress files are located in the root directory or “public_html” then you can select all the files from here only. Otherwise, you have to open the folder where all the WordPress files are located.
Suppose the files are placed in the root directory. Select all the files by using the “select all” option from the menu bar. If you have placed any other sub-domain in the root directory then you have to unselect that folder.
Step 3:- Click on the “copy” option from the menu bar. You will be asked to set the location of the files to get copied. If you have created any folder then set the location as “public_html/foldername” Suppose the folder is “blog”.
If you don’t have the folder then create one. Don’t forget that it’s case sensitive and if you fill “Blog” in place of “blog” then the files won’t get copied.
If you don’t see any activity for few seconds then don’t fret. The system is calculating the time and the size of the files.
Step 4:- Now is the time to set the location of your WordPress files. You can change the site URL using the database. But here, if you are moving WordPress from one folder to another folder then you have to define the location in the system.
It can be done by editing the “wp-config.php” file. Just find this file in the files and folders you just moved. Right-click on the file and click on “Code Edit” and the file will open in the new tab to edit.
Step 5:- In the file, you can see the database name, database username, database hostname. All the credentials are defined by the using the “Define” attribute of the SQL.
Below all these lines, you have to add two lines to change the location. Just add:-
The motive to move files from one folder to another has fulfilled. All the WordPress files have moved from your old location to your new folder “blog”. You can check it by entering the new URL of your website in the browser like “http://yourdomain.com/blog”.
Let me tell you that you can change the site URL using the phpMyAdmin.
Now Do You Know How To Move WordPress From One Folder To Another Folder?
While doing such technical things, you should have the backup of your website and the database. Make sure that to move files from one folder to another folder, you follow the same process described above. I am sure you won’t like to mismatch any code of your website.
Are you still think about moving WordPress from one folder to another folder? Well, stop think and bring your thoughts into an action. Don’t forget to do the last step. Your website won’t open until you edit the “wp-config.php” file. If you face any problem then let me know.