Exercise Preview

Exercise Overview
Once you've thoroughly tested your site's functionality and are satisfied with its performance, the next critical phase is deploying it to a production web server. This comprehensive exercise guides you through migrating your local WordPress development environment to a live hosting platform. While originally designed for 000webhost.com's free hosting tier, the fundamental principles apply to any hosting provider. You'll master essential deployment skills including database migration, URL transformation, and file transfer protocols—competencies that are crucial for any WordPress developer or site administrator in today's web development landscape.
WordPress Upload Process Overview
Setup Hosting Account
Create free hosting account with 000webhost.com and gather FTP credentials
Export Local Database
Use phpMyAdmin to export WordPress database from local development environment
Modify Database URLs
Replace localhost URLs with live domain URLs in exported SQL file
Upload and Configure
Transfer files via FTP and import database to live server
Signing up for a Free Hosting Account
We'll use 000webhost.com for this demonstration, though the concepts translate to any hosting provider. Free hosting services like this are excellent for testing deployment workflows before committing to premium hosting solutions.
Open a web browser and navigate to 000webhost.com (note: those are zeros at the beginning of the URL).
Click the Free Sign Up button on the right side of the homepage.
Under Start Free Sign Up, enter your Email, create a secure Password, and choose your website Name (subdomain). Document these credentials securely—you'll need them throughout this process and for ongoing site management.
Click Get Free Hosting to initiate the account creation process.
Complete the CAPTCHA verification if prompted to confirm you're not a bot.
Monitor your email for a confirmation message (check your spam/junk folder if it doesn't appear in your inbox). Click the verification link to activate your account and return to the 000webhost dashboard.
In the welcome dialog that appears, click It's ok, I want to learn to proceed to the management interface.
Click the Manage website "website Name" button to access your hosting control panel.
Under Build website, carefully note your complete domain URL—this will be essential for the database URL replacement step coming up.
Navigate to the Settings menu in the top-right corner and select General.
Locate and document your FTP details, which are required for file uploads. Record the following credentials:
- Host Name (typically files.000webhost.com)
- Username (your unique FTP username)
- Password (matches your website login password)
Test your new domain by clicking the website link under website Settings. You'll see a default placeholder page—this confirms your hosting environment is active and ready for your WordPress installation.
Hosting Account Setup Requirements
You will need these for future logins
Required for database URL replacement
Host name, username, and password for file uploads
Check junk folder for confirmation email
Exporting the Database
WordPress stores all dynamic content—posts, pages, comments, user data, and configuration settings—in a MySQL database. Successfully migrating this database is crucial for maintaining your site's content and functionality. The export process creates a complete snapshot of your local database that can be imported to your production server.
Start your local development server and launch phpMyAdmin using your platform-specific method:
Database Export PurposeWordPress stores all posts, page content, and comments in a MySQL database. Exporting allows you to transfer all site content from local development to the remote server efficiently.
Mac
- Launch the MAMP application from your Applications folder.
- Verify servers start automatically; if not, click Start Servers and wait for the status indicators to turn green.
- Click Open WebStart page to access the MAMP control panel in your browser.
- In the navigation menu, select Tools > phpMyAdmin to access the database management interface.
Mac Database Export Process
Start MAMP Server
Open MAMP application and ensure servers start automatically
Access phpMyAdmin
Navigate through WebStart page to Tools and open phpMyAdmin
Configure Export Settings
Choose Custom method, select all tables, enable file output and DROP TABLE statements
Windows
- Open the XAMPP Control Panel from your Start menu or desktop.
- Ensure both Apache and MySQL services show "Running" status with green indicators.
- Open your preferred browser and navigate to localhost to access the XAMPP dashboard.
- In the left sidebar under Tools, click phpMyAdmin to launch the database administration tool.
From the database list in the left sidebar, click mrp to select your WordPress database. This database contains all your site's content, user data, and configuration settings.

Click the Export tab in the main interface to begin the database export process:

Configure your export settings according to your operating system. These settings ensure a clean import process by including necessary SQL commands:
Mac vs Windows Export Configuration
| Feature | Mac Settings | Windows Settings |
|---|---|---|
| Export Method | Custom | Custom |
| Table Selection | Select All Required | All Tables Default |
| File Output | Save to File Required | Automatic Download |
| DROP TABLE Option | Manual Check Required | Manual Check Required |
Mac
- Under Export Method, select Custom for advanced configuration options.
- Under Table(s), click Select All to ensure all database tables are included in the export.
- Under Output, choose Save output to a file to download the export.
- Under Object creation options, enable Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement—this prevents conflicts during import.
- Click Go at the bottom of the page to generate and download your database export.
Mac Database Export Process
Start MAMP Server
Open MAMP application and ensure servers start automatically
Access phpMyAdmin
Navigate through WebStart page to Tools and open phpMyAdmin
Configure Export Settings
Choose Custom method, select all tables, enable file output and DROP TABLE statements
Windows
- Under Export Method, select Custom for detailed export control.
- Under Object creation options, enable Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement for clean database import.
- Click Go at the bottom to process your export request.
Your browser will download the export file automatically or prompt you to save it. Modern browsers (Chrome, Firefox, Safari, Edge) typically save downloads to your Downloads folder by default, though you may have customized this location. The resulting mrp.sql file contains your complete database structure and content.
Note: This SQL file is a plain-text representation of your database and can be opened in any text editor if you need to inspect its contents.
Mac vs Windows Export Configuration
| Feature | Mac Settings | Windows Settings |
|---|---|---|
| Export Method | Custom | Custom |
| Table Selection | Select All Required | All Tables Default |
| File Output | Save to File Required | Automatic Download |
| DROP TABLE Option | Manual Check Required | Manual Check Required |
Replacing the Local URLs
WordPress stores absolute URLs throughout its database for media files, internal links, and configuration settings. These URLs currently point to your local development environment (localhost:8888 or localhost), which won't function on your live server. This critical step ensures all internal links work correctly in your production environment.
Launch your preferred code editor (Visual Studio Code, Sublime Text, Atom, or similar).
Select File > Open from the menu bar.
- Navigate to your Downloads folder (or wherever your browser saved the SQL file):
- Mac: Macintosh HD > Users > [your-username] > Downloads
- Windows: C: > Users > [your-username] > Downloads
Open the mrp.sql file. You'll see the raw SQL commands that recreate your database structure and content.
Access your editor's Find and Replace function:
- In Visual Studio Code, use Ctrl+H (Windows) or Cmd+Option+F (Mac)
- In Sublime Text, go to Find > Replace
- In Dreamweaver, go to Edit > Find and Replace
Configure the Find and Replace operation with these exact values:
Find: http://localhost:8888/mrp (Mac with MAMP) or http://localhost/mrp (Windows with XAMPP) Replace: Enter the complete URL of your new hosting domain (including http:// or https:// as appropriate). Example: http://yoursite.000webhostapp.com Execute Replace All to update every instance. This may affect hundreds of database entries.
Save the file to preserve your changes. Your database is now configured for the production environment.
WordPress uses absolute links throughout the database. Failing to replace localhost URLs with live domain URLs will cause linking issues and broken functionality on the remote server.
URL Replacement Details
Mac Local URL
Replace all instances of http://localhost:8888/mrp with your live domain URL. Use Find and Replace in your code editor.
Windows Local URL
Replace all instances of http://localhost/mrp with your live domain URL. Ensure you include the full http:// protocol.
Importing the Database
With your database properly configured for the production environment, you'll now create and populate a MySQL database on your hosting server. This process establishes the data foundation your WordPress installation will rely on.
Navigate to 000webhost.com/members in your browser.
Log in with your hosting account credentials if you're not already authenticated.
Locate and click Manage database in the top navigation menu.
Click New Database (typically found in the bottom-right area) to create your production database.
Configure your new database with these specific credentials for consistency:
Database name: mrp Database username: user Password: passw0rd (note: the 'o' is actually a zero) Click Create to establish your database.
- The system will display your actual database credentials with auto-generated prefixes. Document these carefully:
- DB Name (will include a numeric prefix like id12345_mrp)
- DB User (will include the same prefix like id12345_user)
- DB Host (the MySQL server address)
Important: Your hosting provider adds these prefixes to prevent conflicts with other users' databases on shared servers.
Click Manage > PhpMyAdmin next to your newly created database.
Log into the phpMyAdmin interface using your prefixed database Username and your chosen Password.
Select your database from the left sidebar (it will show with its full prefixed name).
Click the Import tab to begin uploading your local database content.

Click Choose File (or Browse in older browsers) to select your database file.
Navigate to your Downloads folder and locate the modified mrp.sql file.
Double-click mrp.sql to select it for upload.
Click the Go button to begin the import process. Success is indicated by a message like: Import has been successfully finished, [number] queries executed. The query count varies based on your content volume.
Remote Database Setup
Create Database
Use 000webhost control panel to create new database with name 'mrp', user 'user', and password 'passw0rd'
Note Prefixed Credentials
Record the auto-generated prefixes added to database name and username
Import SQL File
Use phpMyAdmin to import the modified mrp.SQL file with updated URLs
FTP Clients
File Transfer Protocol (FTP) clients are essential tools for web developers, enabling secure file transfers between your local development environment and remote servers. While numerous excellent options exist—including FileZilla, WinSCP, and Transmit—we recommend Cyberduck for this exercise due to its free license, cross-platform compatibility, and intuitive interface. The principles demonstrated here apply universally to any FTP client you choose to adopt in your professional workflow.
Cyberduck is recommended for this tutorial because it is free and cross-platform. However, any FTP client will work using the same basic upload principles outlined in this exercise.
Uploading Your WordPress Site
Now you'll transfer all your WordPress files from your local development environment to the production server. This process replicates your entire site structure, including themes, plugins, media files, and core WordPress files.
Launch Cyberduck from your Applications folder or Start menu.
Click the Open Connection button in the top-left corner to initiate a new server connection.
Enter your hosting FTP credentials (website credentials, not database credentials) that you documented earlier. If you need to retrieve this information, visit 000webhost.com/members and navigate to Settings > General.
Server: Enter your FTP host name (typically files.000webhost.com) Username: Your FTP username (provided by your hosting service) Password: Your FTP password (same as your website login password) Click Connect to establish the FTP connection. If you encounter an Unsecured FTP connection warning, click Continue—this is normal for free hosting services that don't provide SSL/TLS encryption.
Troubleshooting: If connection fails, verify your credentials are correct and contain no extra spaces or characters.
Double-click the public_html folder to enter your website's document root directory.
You'll now see your hosting account's file structure. For future efficiency, consider creating a bookmark by selecting Bookmark > New Bookmark to save these connection settings.
Position the Cyberduck window to occupy half your screen—you'll need to see both this and your local file browser simultaneously.
- Open your system's file browser and navigate to your local WordPress installation:
- Mac: Macintosh HD > Applications > MAMP > htdocs > mrp
- Windows: C: > xampp > htdocs > mrp
Arrange your file browser window alongside Cyberduck for easy drag-and-drop file transfer.
In your local mrp folder, select all WordPress files and directories by clicking any item and pressing Cmd+A (Mac) or Ctrl+A (Windows).
Drag the selected files from your local folder directly into the Cyberduck window. Ensure you drop files into the main directory, not into any existing subfolders.
If another Unsecured FTP connection warning appears, click Continue to proceed.
A Transfers window will display upload progress. Large sites with many images or plugins may take considerable time to upload completely.
If prompted about overwriting existing files, click Continue—you're replacing the default hosting files with your WordPress installation.
When the upload completes successfully, close the Transfers window. Your WordPress files are now live on the server.
File Upload Process
Use files.000webhost.com as server
This is the web-accessible directory
Use Cmd-A (Mac) or Ctrl-A (Windows) in mrp folder
Avoid dropping into existing folders
Editing the Wp-config.php File
The final step connects your uploaded WordPress files to the database you created earlier. The wp-config.php file contains critical database connection parameters that must be updated for your production environment.
Switch to your code editor application.
- Open the original wp-config.php file from your local WordPress installation:
- Mac: Macintosh HD > Applications > MAMP > htdocs > mrp
- Windows: C: > xampp > htdocs > mrp
Immediately save this file as wp-config-remote.php in the same mrp directory. This preserves your local development configuration while creating a production-specific version.
Best Practice: Maintaining separate configuration files allows you to continue local development without disrupting your live site settings.
Update the MySQL database connection settings (approximately line 18) with the prefixed credentials you documented during database creation:
/** The name of the database for WordPress */define('DB_NAME', 'id12345_mrp');/** MySQL database username */define('DB_USER', 'id12345_user');/** MySQL database password */define('DB_PASSWORD', 'passw0rd');/** MySQL hostname */define('DB_HOST', 'mysql123.000webhost.com');Save your changes to the wp-config-remote.php file.
Return to Cyberduck and your local file browser window.
Drag wp-config-remote.php from your local directory into the Cyberduck window to upload it to your server.
Monitor the Transfers window until the upload completes, then close it.
In Cyberduck, right-click (Windows) or Control-click (Mac) the existing wp-config.php file and select Delete. Confirm the deletion if prompted.
Right-click or Control-click wp-config-remote.php in Cyberduck and choose Rename.
Rename the file to wp-config.php to activate your production database configuration.
Test your deployment by visiting your assigned domain URL. Your complete WordPress site should load with all content, styling, and functionality intact.
If you encounter a database connection error, verify the database credentials in your wp-config.php file match exactly what your hosting provider generated. Pay special attention to the numeric prefixes and ensure no extra spaces were introduced. Correct any errors and repeat the upload process for the configuration file.
Congratulations! You've successfully deployed a WordPress site from local development to production hosting. This workflow—database export, URL replacement, file transfer, and configuration—forms the foundation of professional WordPress deployment practices used across the industry.
Database Connection Configuration
Create Remote Config
Save wp-config.php as wp-config-remote.php to preserve local development settings
Update Database Settings
Replace DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST with remote server values
Upload and Rename
Upload new config file, delete old wp-config.php, and rename remote version
Once the wp-config.php file is properly configured and uploaded, your WordPress site should be live and fully functional on the remote server. Test all functionality to ensure successful migration.