There are many ways to set the local WordPress development environment. If you have used Local, you will know how simple it is to start WordPress installation.
However, what it doesn’t look so simple is how to deploy sites for your use of local development. What is the best way?
This is what we discuss in this article. Specifically, we will introduce:
3.
4 . Create the export file
5. Import a copy of the site on the live broadcast site
Use WP Engine and Flywheel to deploy through Local Connect
4.5.
Spoiler warning:
Use the local connection with the WP engine and the flywheel It is the easiest way. However, no matter which method you choose, we will guide you to complete the entire process and solve some common obstacles.
Site Migration 101: Any content required for migration WordPress consists of files and databases, so when we talk about migration websites, we specifically talk about it. It’s two things to move.
如果您下载WordPress 或查看现有WordPress 安装的文件结构,您会在根目录中找到三个文件夹和一些文件:
– 根
[ 123]
– /wp-including
– /wp-administrator
– /wp- Content
One of the files in the root directory is particularly important to this dialogue, that is,
wp-config.php
. We will mention it later. The equally important thing is to point out /wp-cONTENT folder is the location of the theme and plug -in file.
When moving the site to a host that has installed WordPress, the unique folder you need to move is [[[[[[ 123]/wp-content
. You can manually deploy your site through SFTP or CPANEL
If your target site uses hosts supporting CPANEL and/or SFTP, migrate in this way to migrate in this way The entry threshold for site files is relatively low. (It is not so easy for the database, but we will arrive there later). The CPANEL file manager is a method that can upload, move and delete files on remote server. You can also use Filezilla and other SFTP clients (suitable for any operating system) to transmit files from local computers to remote servers. If you are not familiar with SFTP, there is an entry guide here.
After setting the file transmission method, you need to understand how to deploy the site created by Local.
Your local area The site file is located on your computer local site \u0026 gt; yousiteName \u0026 gt; app \u0026 gt; public. From there, use the CPANEL file manager or SFTP to move
/wp-confdent
to the root directory of remote installation. 2. Export the local site database By default, Local uses adminer for database management. To visit the database of the local site:
Start Local
For any database you want, click Start site
Click database
tab
Click adminer
Open the database UI
Click
- Export
- to withdraw with Prepare the database to guide [12]3] Keep the default option unchanged. In addition to changing the output to
- Import site database on the remote server
- From your network host, you need to find you The database manager. Your host is likely to be using PHPMYADMIN, but if not, please find the database option.
GZIP
This is a video that displays the above steps.
After opening the database manager, write down the existing WordPress table name. They may start with
wp_
Several questions that need to be paid attention to:
The surface prefix of the database you want to import needs to be specified in the remote server
wp-config.php
file. The front of the table is matched.
You will need to use plugins such as Better Search Replace to use your host URL for general search/replacement of URL. The advantages and disadvantages of deployment through SFTP
Before we continue from the SFTP method, let us emphasize some advantages and disadvantages.
Advantages:
The familiar file browser interface used to move files and folders
- Fine control
- Disadvantages:
[ 123] It is easy to move the file to the wrong folder No version control
- If you accidentally cover the file (or folder) Recovery, if there is)
No automation-you manually move the file/folder from the source server to the target
You must manually export and import the database
You you It may need to update the remote server wp-config.php The database table prefix
The concept of not \”synchronizing\” local changes with the remote server (vice versa) Use the migration plug -in to deploy your site from the local area
The use of migration plug -in deployment sites is usually more friendly than CPANEL migration.
- all-in-one wp migration one of Non -technical user design. We will use the site from local deployment to the example of the network host.
From a bird’s -eye view, this process is similar to moving files and databases from local computers to remote servers, but this method involves more automation.
There are multiple plugins to handle such deployments. Some of the most popular options are All-in-One WP Migration, WP Migrate DB and Duplicator.
The following is the steps you take for such migration.
1. Install plug-in on your local site and production site
You will use all-in-one wp migration plug-in to export local sites and import target sites Essence
2. Add search/replacement rules (optional)
If you want to change the local URL to a remote server URL (or any other search/replacement in the database, replacement/replacement Operation), you can perform this operation before exporting the site.
Use the search/replace the string in the database, such as your local URL and production URL.
3. Set up advanced options (optional)
all-in-one wp migration also enables you Will) include options in your export. For example, some of these options include:
Do not export garbage reviews or release revisions
Do not export the media library, theme or plug -in
3] Among the administrators of your real -time site, transfer to integrated WP migration \u0026 gt; export and create a copy of the site (file and database). Use the free version, you can export the website to the file. If you want to export directly to third -party services (such as Google Drive or Dropbox), you need to purchase an extension.Multi -combined WP migration allows you to easily export the entire site. With the free version, you can only export to the file.
5. Import a copy of the site on the live broadcast site From the administrator of your real -time site, to integrated WP migration \u0026 gt \u0026 gt ; Import and drag and drop the files you exported. Please note that the free version is limited to 300MB or less files.
The advantages and disadvantages of deployment through all-in-one wp migration plugin ]
Before we continue to use the migration plug -in, let us emphasize some advantages and disadvantages.

Including the function of using real -time URL search/replacement of development URL during the migration process
is very suitable for small websites 123]
Disadvantages:
Although using SFTP and database managers than using SFTP and database managers It’s simpler, but this process is not fully automated You may still need to use plug -in on the target site, such as Better Search and Replace In your media library, you may need to use a plug -in such as regenerate thumbnail
For larger sites with a larger database, the server timeout may be encountered when creating a copy of the site ]
If you want to migrate the site directly from another host to WP Engine (completely skipLocal), using WP Engine automatic migration plug -in can easily achieve this goal.
Use WP engine and flywheel to deploy through local connections [ 123]
- Okay, we leave the best and simplest to the end! Although we must have prejudice, it is indeed a easy thing to pass through the Local Connect deployment site.
- 1. Log in to the host
When writing this article, Local Connect only supports a site for hosting at WP Engine or Flywhel. Therefore, if you want to deploy another host, you need to use one of the previous discussions methods.
Local, click the connection icon to access my host option, you can log in to WP Engine and/or flywheel.
- Local connection To the flywheel and WP engine.
After the connection, you can view all sites connected to the host account. You can pull the existing sites (and specific environments) to the local area. This is not what we want to introduce in this article, but it is a good way to use existing Flywheel or WP Engine sites and environment to import the site into the local area.
2. Connect the local site to the host Login After the host, you can connect to the local site to be migrated to the host (Flywheel or WP engine) to be deployed.
3. One -click push deployment
Site connection connection After the host, you can click the Push button to start the push process. If this is the first time you push this site, you need to choose the existing site and to be pushed to the site environment you want to cover.
After every time you click the Push button every time, the site will follow your previous choices.Push to the remote server.
This is a video displayed above.The advantages and disadvantages deployed through Local Connect
Advantages: 123] One -click deployment startup is fully automated, and the site is migrated from local to WP engines or flywheels Use Magicsync to customize the files and folders you want to push In addition to allowing you to accurately control the deployment, using Connect can also provide more help for your deployment process:
Caches removal: We will remove the cache of your website when you start and change.
Backup: When you push the change, we back up your website every two hours.
Security: Unlike FTP (directly connected to your site), Magicsync is routed through separate microservices before deployment.
Sites that providers other than providers other than WP Engine and Flywheel cannot use Local Connect.
ready, setting, deployment!
When moving the site from the local server to the target server, you have a lot of choices. We outline a small part of it above.
Are you ready to try? Free local!