I am trying to move a site from a live URL to my local MAMP environment. How could I do this as I am having a real pain in the back side doing this as wp-admin keeps on redirecting me to my live site or saying certain pages don't exist.
相关问题
- Display product ACF field value in Woocommerce tra
- Adding a custom button after add to cart button in
- How to add a “active” class to a carousel first el
- Setting custom order statuses as valid for payment
- change the font size in tag cloud
相关文章
- wordpress新增页面如何个性化设置
- select query in wordpress
- Get WooCommerce featured products in a WP_Query
- Woocommerce update shipping methods in checkout vi
- Change order status just after payment in WooComme
- Publishing or uploading failed. Error message: “Th
- Facebook Login With WP JWT Auth
- Wordpress development process
You can also edit wp-config.php (in root dir) and add/modify these lines:
There is a great tutorial. It's not enoght just modify the wp-config.php. You have to change all URL in the database too.
Open up your wp-login.php file, check if there is some option update:
update_option('siteurl','http://example.com'); update_option('home','http://example.com');
Remove those lines, or update the addresses. Maybe this is the cause of your headaches, because it may update your database siteurl and home options everytime you access the login page.
I'm assuming you've already copied your entire WordPress directory from your web server to your local MAMP folder.
To take care of the database and URLs, I find it easiest to export the entire DB from your web server using phpMyAdmin or similar, then run find and replace on the exported SQL file to replace your old url (http://www.yourwebsite.com/) with your MAMP url (http://localhost:8888/yourwebsite) then run the SQL script to install the database locally (I use SequelPro).