Преместете блога на WordPress в нов домейн
Свързани Видеоклипове: (Септември 2024).
Преминаването към нов домейн с вашия WordPress блог може да бъде също толкова досадно, колкото и преминаването към реалния живот. Имаме няколко съвета за вас, така че блогът ви да може да се мести възможно най-гладко.
Експортирането на данни на WordPress
В самото начало на промяната на вашия домейн трябва да експортирате и запазите данните си. С разумна прогноза, разработчиците на WordPress са ви предоставили инструмент за това.
- За да експортирате данните, първо отидете на таблото си за управление.
- След това вляво ще намерите „Инструменти“ и изберете „Експортиране на данни“. Можете да изберете кои данни да бъдат експортирани, ако преместите блога, вероятно ще изберете всички от тях.
- След като направите своя избор, щракнете върху „Изтеглете експортния файл“ и след това данните ще бъдат записани на вашия компютър.
- Във файла "wp-config.php" ще намерите предишните си данни за достъп, като "DB_Name", "DB_Password", "Db_Host" и "DB_User". Вие замествате данните на вашия "стар" домейн с новите данни за достъп.
- За да импортирате данните на WordPress във вашия нов домейн, следвайте същия маршрут, както е описано по-горе, но в този случай избирате опцията „Импортиране на данни“.
Файловете на базата данни на вашия блог
- Можете да експортирате файловете на базата данни, които да бъдат архивирани например с MySQL, и да ги запишете на вашия компютър.
- Разбира се, вие също трябва да актуализирате записите в данните на базата данни според URL адреса на вашия нов домейн. Двете таблици "wp_options" и "wp_posts" са решаващи.
- Разбира се, можете да направите и модификациите ръчно. Програмата phpMyAdmin обаче ще направи задачата по-удобна и най-вече значително по-бърза.
- За да промените записите в таблиците "wp_options" и "wp_posts", щракнете върху раздела SQL в phpMyAdmin и след това въведете следните две команди - с което, разбира се, ще замените "myOldDomainAddress" и "myNewDomainAddress" със съответните ви URL адреси:
- За промените в таблицата "wp_options": UPDATE wp_options SET option_value = замени (option_value, '//www.meineAlteDomainAdresse.de', '//www.meineNeueDomainAdresse.de') WHERE option_name = 'home' ИЛИ option_name = 'siteurl ";
- За промените в таблицата "wp_posts": ОБНОВЛЕНИЕ wp_posts SET guide = замести (guide, '//www.meineAlteDomain.de', '//www.meineNeueDomain.de');
- След като направите това, импортирайте базата данни във вашия нов домейн.
Пренасочете търсещите машини към вашия нов домейн
И накрая, вие използвате "Пренасочване 301", за да информирате търсачките, че сте преместили вашия блог на WordPress. Освен това препращате посетителите, които са дошли в стария домейн чрез търсачка, към вашия нов домейн WordPress.
- В основната директория на сървъра на "стария" домейн създайте файл ".htaccess". Моля, не забравяйте периода преди htaccess и след това въведете следното във файла:
- ПрепишетеEngine на
- RewriteCond% {HTTP_HOST}! ^ Www \ .meineNeueDomain \ .de $
- RewriteRule ^ (. *) $ //Www.meineNeueDomain.de/$1 [L, R = 301]
Ако искате да знаете колко посетители намират пътя си към новия ви домейн, ще ви кажем как лесно да вмъкнете брояч на посетители в WordPress.