Our first sites were built on a local system (localhost) and then uploaded to the live site.
That gives us the freedom to experiment, while causing and fixing problems and learning as we go.
We work locally with wamp on Windows and MySQL/Access databases for external data.
So what are the basic steps for updating your existing site manually from a localhost setting?
Update WordPress database:
- Export local phpMyAdmin database to .sql file
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement
and in case of international issues, make sure the file is saved as utf-8 Unicode).
- Open the resulted .sql file in a simple text editor, rename all “localhost” instances to your online site’s domain or folder, such as “mysite.com” or “mysite.com/myfolder” and save.
- Import edited .sql file to remote DB.
Update site’s files
Copy all updated files to the correspondent folder in the site’s file system.
DO NOT copy your local wp-config.php, .htaccess, or modules that use external database as is.
We save two copies of these files (local/online configuration) and only upload the online version.
Manual site move
Moving a basic WordPress site from one domain or folder to another is a very similar process:
- Move all files to the new host/directory
- Export old WP database to .sql file
- Rename all instances of “oldsite.com/oldfolder” to “newsite.com/newfolder”
- Create new WP database and update the connection info in wp-config.php
- Import .sql to new WP database
- Manually copy old site’s text widgets and recreate on new site.
- If needed, fix domain paths on .htaccess
- If you’re using the same external database, no changes required there.