Installing WordPress directly from its host can be done very simply thanks to the CMS installer, the quick installation procedure proposed by some, or even your favorite webmaster … However, the right method is to work on a local copy of his site before uploading it to the remote server. We will see here how to create a database, configure WordPress, perform its FTP transfer and finalize its migration.
Installing WordPress at your host first line is quite simple, I have already described the steps of a manual installation in the article ” Create a WordPress site, the really complete guide “, and some hosts like OVH offer you a simplified installation of CMS such as WordPress (you can consult the official documentation of the provider ” How to use the modules in 1 click “). I propose here a local server installation guide.
Install WordPress locally
To work on his site locally , it is necessary to install a server Apache his computer. Depending on the operating system , we have the choice of software: MAMP for Mac , XAMPP for LINUX, Mac and Windows , or Wamp for a Windows PC only.
For each of these programs, the installation procedure is very simple, in just a few clicks. I invite you to download your version of the Apache server and read its documentation for more details on this subject.
Manage your database
Like any CMS, WordPress works with a database, for you to create and assign it.
Once Apache is installed, type the URL ” http: // localhost / phpmyadmin ” in the address bar of your browser (or ” http: // localhost: 8888 / phpmyadmin ” on Mac).
If you use Wamp, you will be asked for an ID to access the administration screen. Then use “root” and leave the “Password” field empty.
Click directly on the “Databases” tab , then enter a name for your database, including only unaccented letters, numbers, and underscores. In the dropdown menu ” Collation ” select ” utf8_general_ci “.> / P>
Creating a database with PHPMyAdmin to install WordPress You must now modify the access rights to your database to install WordPress with it.
you will select your new database, click on the “Privileges” tab and then on the ” Add a user account ” link .
In the new window, you must enter a username and password according to the preceding rules. Finally, in the ” Global Privileges ” section , click the “Check all” box and then the ” Execute ” button at the bottom of the page.
PHPMyAdmin Added rights to the user of the WordPress database
You have just defined a user and their privileges to access the database of your WordPress site.
An alternative is to go through the SQL tab and type the following code in the text field:
GRANT ALL PRIVILEGES TO ma_table_wordpress.* TO mon_identifiant@localhost IDENTIFIED BY ‘mon_mot_de_passe’
Click on “Run” to finalize.
PHPMyAdmin, SQL code to add rights to the database user before installing WordPress
Everything is ready, we will now download and configure WordPress
Download WordPress in French
To take advantage of the latest version of WordPress in French, go to the WordPress site , download the CMS, extract it to your hard drive and rename the folder so that my site corresponds to the site to install. Copy the entire folder into the “Document root” directory corresponding to your Apache platform: “Applications / MAMP / htdocs” with MAMP (Mac), “c: \ wamp64 \ www” for Wamp (Windows), or “/ opt / lampp / htdocs “for XAMPP (Linux).
Create and customize the WordPress config file
Before installing WordPress , we will use and rename the wp-config-sample file located at the root directory of your site (your WordPress folder). This configuration file gives the necessary information to the CMS to communicate with the database and secure the website. Start by changing the name of the “wp-config-sample” file to ” wp-config ” by keeping its “php” extension , and open it with your favorite code editor . Notepad ++ on Windows is totally free, but you can also use Sublime Text (any system) or Coda (Mac) if you prefer (be careful they are paying).
You will replace ” your_db_name ” with the one you assigned to your database, ” your_bdd_user ” with the previously created user ID, and ” your_db_mdp ” with the password you gave it.
To install WordPress, rename and customize the wp-config-sample.php file
With your browser, go to the WordPress page to generate “unique phrases” to change salt and secure the site. You will be able to copy the 8 lines (of code) instead of the default lines of the file. Finally, you can change the “wp_” prefix of your database tables to provide additional protection.
Customizing the unique security keys and prefix of the WordPress database tables in the wp-config.php file
Now everything is ready, we can finally install WordPress and our site at the same time.
Finish installing WordPress
The installer of your WordPress site is now accessible from your browser by forwarding the address of your local server by the name given to the directory of your website: ” http: // localhost / my_site ” or ” http: // localhost : 8888 / my_site “(on mac).
To finish installing WordPress, you will go to this URL, choose a login and password to access the site and provide your email address and click on the “Install” button. After a few seconds, you will be able to login and start working on your site.
WordPress installation screen
When you are ready to move your site into production (put it online), you will have to migrate it and transfer it to the remote server (that of your host).
Install your WordPress site at your host, transfer and migration
To transfer your site, you will quickly install WordPress on your domain using the installer by following the steps explained in the article “Create a WordPress site”. It is about the same process as seen previously, but less complicated.
You will then use WP Migrate DB to transfer your WordPress database.
Exporting the database
You will need to add and activate the WP Migrate DB extension both on the remote site and on your local WordPress site. Then open the extension admin page on each site in a different window, and copy and paste the contents of the URL and path fields from the remote site to the local site override fields . Then click on the “Export” button.
Export the WordPress database with the WP Migrate DB plugin
All you have to do is access the PHPMyAdmin interface proposed by your host to empty the remote database and import the export you have just created.
Importing a database to install WordPress on a remote server
FTP transfer, to finish installing WordPress at your wordpress hosting.
To finalize the installation of your WordPress site at your web hosting, you will have to download your data on its server, and to do this, you need a software called ” FTP client “. There are many solutions and you can use a free FTP client such as FileZilla or Cyberduck to access your dedicated or shared server.
Regardless of the FTP software chosen, 3 information will be required to connect to your server: the host , usually corresponding to your domain name (without the HTTP protocol), an identifier and a password . This information is always communicated to you by your host since the validation of your accommodation.
Your FTP client offers 2 windows , the left corresponds to your hard drive, the right to that of your provider. All you have to do here is drag and drop the contents of your local site folder excluding htaccess and wp-config files , to your host’s server folder. Depending on the amount of data to download, this may take more or less time.
FTP transfer of a WordPress site with FileZilla
Starting with installing WordPress locally only has advantages
Performing the installation of a local version of your site allows you to better understand the setting and securing of your database. It also allows you to test your content changes or themes before sending them to the server and avoid problems with uploading. Finally, installing WordPress on a local server allows you to work offline with your webmaster and easily validate the services performed.
So, do not hesitate to send me your questions about the installation of WordPress, I will be happy to answer you. Thank you for your attention !