To migrate the wordpress theme to hosting and need to save paths to images?

How to transfer wordpress theme to hosting and need to save paths to images?

Create pages and posts with preview images. Transfer the database to the hosting, pages, and records are stored together with the content, but the way to images are not saved and you have awesome choose from a catalog of media files. How to fix?
March 19th 20 at 09:18
1 answer
March 19th 20 at 09:20
Solution
You must comply with the condition:
The name of the root folder locally is the same as hosting it in the scan

and in the file config.php to prescribe the following:

define('WP_HOME','example.com');
define('WP_SITEURL','example.com');

Instead example.com - the absolute path of your site on an external server
Prescribe, but gives:
Error connection to database


Set in the necessary root of the site example.com
If you put in example.com/wordpress it starts normally - Willard.Marvin31 commented on March 19th 20 at 09:23
@Willard.Marvin31, Check all the config settings database name/password - Beryl_Schill commented on March 19th 20 at 09:26
@Beryl_Schill, it was more difficult (not only name and password), but it turned out - Willard.Marvin31 commented on March 19th 20 at 09:29
@Willard.Marvin31, sincerely happy - Beryl_Schill commented on March 19th 20 at 09:32

Find more questions by tags WordPress