Deploying your WordPress website from your desktop to a live server is easy if your host uses cPanel. You won’t even need to mess around with FTP software as cPanel includes a file manager utility that can greatly simplify and speed this task for you. DesktopServer Premium also features a Quick Deploy feature that can make it faster for small to medium-sized sites. But in this post I’ll show you how to deploy a site manually with cPanel alone which is better suited for larger or more complex sites that Quick Deploy may not support. There are three basic steps to deploying manually:
- Create an Empty Database
- Export Your Development Website
- Upload Your Website Data
Step 1 – Use cPanel to Create an Empty Database
WordPress separates style and content by storing page and post content in a MySQL database. This requires that you create an empty database for storing your website content. Thankfully, cPanel makes it simple to create a new database for your content.
First login to cPanel, navigate to the Databases section and click on the icon titled “MySQL Database Wizard”. The database wizard will allow you to quickly do the following:
- Create a database and name it.
- Create a username for the database.
- Specify a password for the database.
- Grant the username privileges to the database.
After clicking the “MySQL Database Wizard” icon, you can then specify your database name. Your database name may be prefixed with your cPanel account username followed by an underscore. Be sure to record your complete database name with the prefix and underscore (i.e. scarroll_example). Click the “Next Step” button to continue.
Next, you will be prompted for a database username. Like the name of your database, your chosen database username maybe prefixed with your cPanel account username followed by an underscore. For simplicity, you can use the same name for both the database username and the database name (this will also make it easier for phpMyAdmin to manage). Next, specify a password or click the “Password Generator” button to have a password generated for you. Click the “Create User” button to continue.
Be sure to record your database name, username and password on the following screen as you will need this information when exporting your website from DesktopServer. Lastly, you will see the privileges section. Simply click the “All Privileges” checkbox as WordPress will need all privileges to work effectively. Click the last “Next Step” button to finish and complete the MySQL Database Wizard.
Now that you have an empty database created on your live server with valid credentials, your next step will be to give the database credentials to DesktopServer’s export process. This will allow DesktopServer to prepare a copy of your wp-config.php file for hosting on your live server.
Step 2 – Use DesktopServer to Export Your Development Website
Provide those user credentials you recorded from your live server in step 1 to DesktopServer so that we can create an export that will work on your live server.
First, start DesktopServer and select the last option to “Export or import a website”, followed by the “Export a website archive” option. Clicking the “Next” button will take you to the export options screen.
The export options screen will display a drop down list of websites that you have created on DesktopServer. Select the website that you want to export to your live server followed by the database name and credentials you obtained using the MySQL Database Wizard. Unless you were provided with a specific host, be sure to type localhost for the “Host” field. Then click the “Next” button to continue.
Lastly, you will need to provide the live server domain name that users will use to reach your site. Be sure to include the valid TLD (top level domain) extension (i.e. www.example.com, postmy.info, testing.co.uk, etc.).
Click the “Next” button and DesktopServer will start exporting your website, replacing .dev with your chosen top level domain in the database and php files. You will see a link to the folder containing your file archive. The archive will contain your complete WordPress website which includes the WordPress core files, themes, plugins, and a complete export of your database as a text file called database.sql.
Step 3 – Upload Your Website Data
Deploying your website manually is a simple two-part process: 1) Import your database and 2) Upload your WordPress files. We will start with extracting the database.sql file from our archive. Decompress the archive file by double clicking it (on Macintosh) or right-clicking it and selecting “Extract All…” from the pop-up context menu (on Windows). Open the extracted folder and move the database.sql file to the desktop or a new place by dragging it from the folder.
Your database.sql file may be large if your website has a lot of posts and pages or uses third-party plugins to store an extensive amount of data (i.e. real estate listings, list of products for eCommerce, etc.). In either case you may wish to compress the database.sql for faster uploading as a separate zip archive. Simply right-click the database.sql file and select the ‘Send To ? Compressed (zipped) Folder’ (on Windows) or ‘Compressed “database.sql”‘ (on Macintosh) from the pop-up context menu. It is important to make sure that the file name ends with a “.sql.zip” otherwise cPanel’s phpMyAdmin may not know what to do with the file. By default, Windows renames the file and removes the sql extension to read just “database.zip”. Windows users must rename the file (right-click and select rename) to database.sql.zip for compatibility.
Import Your Database
Now go to your live website’s cPanel and click on the phpMyAdmin icon. phpMyAdmin should appear and present you with a list of databases on the left hand side. Select the database by the name you used in Step 1. Be sure to select your database first as we’ll be uploading the database.sql.zip file and it is important to have the proper database selected. Next, click the Import tab at the top of the phpMyAdmin page, followed by the “Browse” button and select the database.sql.zip file. Lastly, click the “Go” button to begin uploading and importing your data into your live website database.
Upload You WordPress Files
Next, you will need to upload your WordPress website files and folders. Once again, cPanel makes this incredibly easy and significantly faster then having to use a client FTP program. You will be able to take advantage of maximum compression without having to wait on uploading multiple files because cPanel will allow you to use the server to decompress and move files. Start by going back to your extracted folder from your website archive. This folder will be much smaller since you’ve moved the database.sql file out of it. Before compressing it, be sure to move or discard the original website archive that contained the database.sql file to avoid confusion (as it will have a similar .zip name). To re-compress the extracted folder that has only your WordPress website files (minus the database.sql you moved out), right-click the folder and select the ‘Send To ? Compressed (zipped) Folder’ (on Windows) or ‘Compressed’ (on Macintosh) from the pop-up context menu.
After compression, you can upload the file using cPanel’s File Manager. Select the File Manager icon from cPanel and select your website root folder. The website root folder is usually labeled www or public_html. You might have both folders where one is simply an alias for the other. Highlight the folder in the left hand side of the File Manager and select the “Upload” icon from the toolbar.
Clicking “Upload” will cause File Manager to present you with a webpage to upload your website archive file. Click “Browse” and select your file. A progress bar will automatically be displayed indicating the progress of your upload. The status will change to “Complete” when the upload has finish. After the file finishes uploading, go back to File Manager’s list of files. If the uploaded archive isn’t initially visible, try the “Reload” icon above the list of files.
Next, find and click the archive file to highlight it. Use the “Extract” icon on the button toolbar to extract the contents of the website archive. By default, the contents of the file will be extracted to a folder with the same name as the archive file. You may need to wait while the server extracts the files. If the folder does not appear visible, try the “Reload” button above the list of files.
You will need to move the contents of the extracted files folder to the site root. cPanel makes moving the files easy. Select the extracted folder in the folder list (left hand side) or double-click the extracted folder in the file list view (right hand side in the File Manager) to view the list of extracted files. With the folder contents revealed, simply click the “Select all” button above the list of files followed by the “Move File” icon on the icon toolbar. Use the backspace (delete on Macintosh) key to correct the folder path to read /public_html/ as we will want to move the files to the site root.
After moving the files to the correct location, you can discard (delete) the website archive along with the extracted folder by simply highlighting (click) the items in File Manager and clicking the “Delete” icon (red ‘X’) on the icon toolbar. You should now be able to visit your website’s home page (i.e. http://www.example.com). However, you may need to first update your .htaccess file by re-saving your permalink settings from WordPress’ admin pages. To access WordPress’ admin pages, visit the sub-folder ‘wp-admin’ (i.e. http://www.example.com/wp-admin). Go to the Settings ? Permalinks menu followed by clicking the “Save Changes” button. If you are installing a WordPress multisite, you may need to update your .htaccess file manually by visiting the Settings ? Network Setup menu and updating the .htaccess file with the suggested settings found there. You can use cPanel’s File Manager to edit any PHP file by selecting the file and using the “Edit” icon on the toolbar. By using DesktopServer’s export functions to prepare your website along with cPanel’s built-in File Manager, you can speed deployment of your complex or larger WordPress websites on a live server without any extra tools or utilities. Equipped with this experience and knowledge will make you a more skilled and valuable WordPress developer. You will be able to take on larger projects on a multitude of professional hosting providers that support the cPanel interface.
Troubleshooting
Error establishing a database connection – This is an indicator of an incorrect username, database name, or password in the wp-config.php file. You can correct and/or double-check these items from within File Manager. Simply find the file using cPanel’s File Manager by clicking the public_html folder from the folder list (left hand side of File Manager). Select the wp-config.php file in the file list and click the “Edit” icon on the toolbar to edit the file contents on the live server. An editor will appear that will allow you to edit the file contents. Look carefully at the definitions for the DB_NAME, DB_USER, DB_PASSWORD and DB_HOST. You can save changes via the “Save Changes” button in the upper right hand corner of your web browser.
You will have to turn on hidden files if you need to open the .htaccess file manually to edit it. The opportunity to show hidden files is shown when first you click on the File Manager icon in cPanel. A prompt will ask you if you want to see hidden files or if you want to dismiss the prompt in future sessions. To reset the prompt and to see the view hidden files checkbox again, use the reset interface link in cPanel.




Hi Steve
Thanks for the instructions. I had a bit of a trying time to get my sites set up on my subdomain – I was installing at the root of the main account and not the subdomain account. All good now.
Loving ServerPress.
Nicole
Thank you Stephen, for this very helpful guide.
It is indeed a pleasure to use ServerPress.
Russell
what’s the point of tutorial that is only for premium users?
how do you make step 2 with free version?
program is great but the whole point of developing a website is to put it online one day and that is the one of the main keys missing here.
Hello Dany,
The point is that my Premium users want and pay for these tutorials. Thank you for asking! It’s how I live, eat and breath.
thanks for the answer. i see that, but shouldn’t the free version still get at least minimum support? i mean, don’t get me wrong but i just developed site for free energy healing and don’t get any money for that. i used serverpress so i don’t have to be online all the time while i’m working on the site.
i definitively didn’t get the impression i will have to pay around $50 just to upload my site. so that’s what i don’t understand, why create a a free version if one can’t use it to create website? it’s ok if the idea is to get people to buy premium version but still i thing it would be fair to point that out before people download the program and work for hours before they realize what is happening.
ps.. i hope i don’t sound rude or anything. i was just happy to get this thing online finally and then hit the wall
not to mention it’s 4:14 am where i live..
thanks anyway,
regards!
Hi Dany,
It is very clear on the product page, please be sure to check it out the comparison matrix. I’m sorry that DesktopServer has features that others do not (though I’m not sure why I should be apologizing to you for this).
There are other products that can help you migrate your site, and in fact that is their expertise and they do a *better* job then DesktopServer! Check into iTheme’s BackupBuddy. Not only will you get site migration, but also an essential backup solution.
Now about the fact that you have developed a ‘free energy healing’ website without telling me leaves me sad. I had to write, market, and create this entire site and spend thousands of *unpaid* hours to and am only now hearing about it?! I feel absolutely jilted and even more insulted that you tell me about it while not revealing the URL! How fair is that?!
hi stephen,
sorry about that, i just tried to explain situation i’m in.
i never asked you to apologize for anything.
it is true that there is a comparison link for the 2 versions, yet on the first glance (description summary shown before download) only visible limitation is limit for developing 3 sites. i was referring to that description.
anyway, thank you for the extra information and effort!
by mentioning the project i just wanted to point out it’s a free service type of thing, but since i don’t use english as my primary language i used the term ‘free energy healing website’ since i thought it will transfer the message in a more clear way.
site is obviously not uploaded yet, but i’m hoping to do it tomorrow.
url is: feelingod com
i don’t see a use for backup buddy though, i only want to get the site i made on a server since i don’t need it on my drive alone.
anyways, i think it will be doable by changing .dev extensions and copying the wordpress data manually. i’ll let you know how did it went.
btw., what plugin are you using for showing images in popup window? it is really nice. thanks!
Hello Dany,
I’m using “FancyBox for WordPress” that can be found in the WordPress Plugin Directory.
Regards,
Stephen
thanks a lot!
Finally here is some update!
After few days of experimenting I found plugin “WordPress Move” to be most useful, and work flawlessly. It works by installing WP on your server and adding that plugin. Than you upload your files using plugin on your local installation to the server. You can even arrange it to change your domain to whatever you want, which of course includes changing of “.dev”. Anyways, site is now up but i’ll be testing it and adding some more stuff within next few days.
Thank you!
Move is one option, but it does not update hardcoded ‘.dev’ in your source files, just the database (though you should adhere to the WordPress API and not hardcode anything). DesktopServer Premium provides this functionality natively and for the obvious convenience of multi-project management.
Of course. I would recommend anyone to support DesktopServer, especially if developing several projects! If I continue using it in future projects, I’ll be sure to do so myself.
I am about to attempt a first upload of a new site to a GoDaddy Linux hosting instance. The hosting account is fresh, no customizations yet.
The hosting platform is their new 4GH-Wordpress offering where supposedly lots of WordPress setup prep is already done.
Questions:
1. Do you know if this GoDaddy 4GH-Wordpress hosting platform uses cPanel?
2. Does this How-to still work for this type of hosting instance? Are their additional or unnecessary steps?
3. Any additional feedback that could be of help in doing the first import to this 4GH-Wordpress hosting instance?
Thanks!
–Jeff
(fellow San Diegan)
Hi Jeff,
I don’t know if GoDaddy offers cPanel and do not recommend them (you may wish to ask GoDaddy about that). We do have users that use GoDaddy and have no issues using the QuickDeploy method (http://serverpress.com/news/using-quick-deploy-on-a-live-server/). With any hosting provider, it’s best to simply get a basic install of WordPress running on the host. Most hosts provide an easy one-click option to install WordPress and this eliminates 90% of the install issues. Then all you will need to do is use the QuickDeploy method, skipping all fields for username/password, db, etc. All you’ll need to do is the following:
1) Select the Import/Export option
2) Select the website you want to export and click next
3) Make sure you specify the valid site name (with TLD) as you would like your visitors to visit i.e. http://www.example.COM., then click next.
QuickDeploy will automatically use your working installation of WordPress on the server and overwrite it. For *specific* additional support, please post in our support (in lieu of comments that all subscribers receive) at http://serverpress.com/forums
Trainwreck..
Quick Deploy on GoDaddy nuked the entire install. When I ran QD (domain/quick-deploy.php) it asked if I wanted to proceed and then deleted my entire content including uploaded files and never came back.
Correct. When Quick Deploy says ” !!! WEBSITE WILL BE ERASED !!! … will overwrite your website!”, it really means it.
It sounds like you need support. You may wish to post in our support forum for QuickDeploy at http://serverpress.com/forum/premium-support/quick-deploy/
CAn this method be used tp deploy the website via cpanel to a subdomain, while the original site stays live (also in a subdomain)>
We would caution installing websites for subdomains with a live website in the site root. Yes, this is possible but please take care to backup your site root as subdomain sites that branch from the live site root folder can be easily overwritten.
Hi Stephen,
Thanks for all of this – I know you’ve heard it before, but it’s made my life so much easier. I wanted to add this bit of info for those of us who *really* don’t know what we’re doing:
When using multisite with subdomains, use cpanel to create those subdomains and set their document root to /public_html. Then be advised there will be some waiting while the subdomains propagate.
Hi Stephen,
I’m trying to install my website in a subfolder on my domain. I have found other postings by you explaining how to do this by changing the url in the Admin panel, but It’s not clear to me at what point in this tutorial I actually make that change. If I set the subfolder before exporting from Server Press, then won’t Server Press be unable to find my site?
Hello Susan,
If you define a subfolder that does not exist; your development site will cease to function. Export will still work and produce a site that will also cease to function. The export feature is designed to mirror the site’s structure on a new server (another instance of DesktopServer, or a live web server). For export support; consider posting in our forum at http://serverpress.com/forums
I am reading these instructions before buying the unlimited license but there is something that is getting me nervous. Step 3, paragraph 8 says: “You will need to move the contents of the extracted files folder to the site root.” My cPanel File Manager Folder looks very organized so far. The files for my two current websites are under two folders with their respective names. I understand with these instructions that If I export my files for a third website I am going to have all those subfolders (wp-admin, wp-content, wp-includes, cgi-bin) for that third website directly under public_html? Thanks for your advise.
Hello Edgar,
You’ll want to follow http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory. DesktopServer is compatible with this format. Advanced users can modify DesktopServer’s blueprint to create all sites in this format.
Thanks for the link. Still confuse. Can’t understand if the instructions of the link are suppose to be done before or after exporting from desktopserver. And some of the instructions don’t match the one i received from my hosting company, bluehost. Will keep looking around. Thanks.
Since the purpose of DesktopServer Unlimited is to be able to create many sites on your local machine, logically, the export process should also allow to add these sites in an organized fashion. We should be able to export everything to a subfolder on cPanle root directory and then adding some instructions in how to change the url in phpMyAdmin, wordpress permalinks, etc. I would definitely purchase the unlimited license if this were the case. For now, I will build a site using DesktopServer (which I am glad it exists) and re-build it online. It is slower than my suggestions above but cleaner than the final results obtained with the current method of exporting explained here. See you soon!
Most of our users are “Professional” developers deploying to multiple servers, often multiple VPSs, dedicated servers, or higher end managed servers like WPEngine. What you are proposing is the deployment of all sites at once to a given cPanel account. This might be well suited for lower end sites that do not need the isolation, security, or require the higher traffic needs of multiple accounts and servers. Attempting to place all of your sites under one fraction of one cPanel instance, via “add on domain” is not recommended for larger volume sites.
I’m using desktopServer for the first time and running into a snafu deploying the site on a 1and1 server (i’m doing this for a friend so I’m not very familiar with 1and1 and so far it seems wretched). unfortunately, the url for the site I’m developing (ff.com) is forwarding to a subdomain of a different url (sv.com) which I’m guessing is causing some of the trouble b/c when I at first used quick deploy, the homepage that turned up was for the main URL (sv.com). i’ve troubleshooted myself into a mess where i can no longer access my site thru DS (all the files are still there, it just doesn’t show up). I used the original zip file created during quick deploy to try a manual deploy, and while now I can see that my database has all my data, but navigating to ff.com gives me a page not found message, BUT it does show the three nav items that I created in ff.com, so it’s grabbing something at least from the db. I checked the wp-config.php file, and it looks fine. But beyond that I don’t know where to begin looking for errors. I’m not a developer, really just learning what I can for fun
Any suggestions will be greatly appreciated! thanks
Nevermind! I fixed it!
Hi Steve,
and how is your wonderful self today?
I have tried the steps above and have no success.
1. when importing the .sql.zip it comes up with an error saying duplicate post encountered. How do i solve this.
2. I went onto step two. All files uploaded but i cannot access my websiite nor even login to wordpress.
Please help.
many regards
You may need to drop your existing tables first. It looks like you need additional support. Please take a moment to post the error message in our forum at http://serverpress.com/forums for a faster response.
Thank you for your patience!
Dear Stephen,
I had a seamless and stress free experience moving a large WP site from one host to another, thanks to your excellent documentation. ServerPress is a great investment and an outstanding product!
Many thanks,
Michael
Must say the exact same as msa3777.
For a number of reasons my last bet was to upload a mirror from my local install.
Just Magical and
Many many thanks.