Because of some sudden need I had to check how a wordpress website can be locally maintained. One simple way of maintaining a website and deploying it to live site is below.
- What you need is a local database server and a Webserver. One of the available options which comes as an integrated package is MAMP(Macintosh, Apache, MySQL, PHP). LAMP/WAMP/XAMPP does the same thing for Windows.
- Install MAMP. The default folder for hosting is htdocs. This can be modified through Preferences > Apache.
- Start MAMP Server. The default site will be http://localhost:8888/MAMP/.
- Extract the WordPress installation into htdocs folder.
- Open phpMyAdmin from http://localhost:8888/MAMP/
- Open the tab Databases
- Create a new database and name it as wordpress
- Rename the file wp-config-sample.php as wp-config.php in the folder htdocs>wordpress
- Modify the below lines in the file.
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
database_name_here will be wordpress as what is set.
If DB_USER and DB_PASSWORD are not modified, they will be set to root/root.
10. Configure the wordpress installation through the path http://localhost:8888/wordpress/
A plugin, duplicator is an easy way to migrate the website. What you need to do is to install the plugin, download a copy of the website and move it to the live location. Use the same plugin to deploy the local site.
A few good references –