![]() That’s it, your site should be working locally.īonus Tip: you could also export your uploads folder from your live site and paste it inside wp_content so that all your media shows up. To do that, we need to again go to phpMyAdmin, select our database, click on the + right next to the name, select wp_options table, and edit site_url and home to be. If you exported the database from a production site, chances are that when you try to open your dev site, it will redirect you to your live site, this happens because your site_url and home probably still have the production site url as its value in the local database, we just need to change that to our local url (this is another reason why aliasing localhost is useful!). To learn more in detail about this file (and get a full file sample) go to the documentation page here. ** The name of the database for WordPress */ĭefine( 'DB_NAME', 'database_name_here' ) ĭefine( 'DB_PASSWORD', 'password_here' ) You need to add (if not present) or update wp_config.php, it should be located in the root of the project in order to make a successful database connection, just define the values with your database and host info, make sure to update 'DB_NAME', 'DB_USER', 'DB_PASSWORD' and define 'DB_HOST' to 'localhost'. NOTE: MySQL default port is 3306, if you picked a different port like I did on this example, you need to pass two more flags, the port and the host just like this (make sure the host flag is 127.0.0.1): /Applications/MAMP/Library/bin/mysql -port=8889 -host=127.0.0.1 -u root -p my_db < /Users/owner/Downloads/my_site_db_backup.sql 5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |