1. Приветствуем Вас на неофициальном форуме технической поддержки XenForo на русском языке. XenForo - коммерческий форумный движок от бывших создателей vBulletin, написанный на PHP.

1.1.3 Как поменять доменное имя?

Тема в разделе "Основные вопросы по XenForo", создана пользователем wagamata, 18.06.2013.

Загрузка
  1. wagamata

    wagamata Местный

    Регистрация:
    07.05.13
    Сообщения:
    135
    Симпатии:
    13
    Версия XF:
    1.3.2
    Мда, только вот:
    You do not have permission to view the full content of this resource.
    ». При чём регистрация не спасла ситуацию...:(
     
  2. asket

    asket Активный пользователь

    Регистрация:
    07.02.13
    Сообщения:
    152
    Симпатии:
    40
    Версия XF:
    1.2.0
    I have recently changed my forum’s domain name and I thought I should write a brief document for others if they would like to do the same in future.
    This document is written for Linux server running Apache & SQL and of course Xenforo.
    At this stage, I assume you already have bought a new domain and setup its DNS; and you have access to SSH.

    Note: Replace everything in RED with actual information.

    Step 1: Lock your current/live forum:
    Go to Admin Cp > Options > Board Active > uncheck board Active and write a message in a box for your members and click Save.


    Step 2: Take a backup of Database
    Login to your server via SSH and type the following command and replace the words in RED with actual information.

    mysqldump --opt -uUSERNAME -pPASSWORD DBNAME > /PATH/TO/backup.sql

    If your host is not “localhost” then you use the following command:

    mysqldump --opt -hHOST -uUSERNAME -pPASSWORD DBNAME > /PATH/TO/backup.sql

    Check your current forum directory /library/config.php for correct information.
    If no access to SSH then login to cpanel, click PhpMyAdmin click database from left column > Export tab from right column. Select all the tables for export and click Go button at the bottom. Download the backup on your computer, this process can take long depending on the size of the database.


    Step 3: Take backup of Files
    If you are in already in your old forum root then run this command

    tar -czvf backup.tar.gz *

    If you are not then run following command.

    tar -czvf backup.tar.gz /path/to/forum_root/

    Note: this process can take long time.
    If no access to SSH then login to Cpanel click Backup, then click the button that says “Download and generate a full backup”. On next page select HOME DIRECTORY and enter email address for email notification upon its completion, click “Generate Backup”. Once its done, you will receive an email notification. You can then come back to this same page to download. Please keep in mind the tar/gzip file it will create would have different directory structure. For example, above we only made tar file for xenforo file but this process will contain whole other information as well.


    Step 4: Create a new database
    Login to your new domain’ cpanel account click MYSQL and then create new database. Also create new database user and password and allow all access to that database. Do not forget to save all the info
    Use the following link to learn more about creating new database using cpanel:
    http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/MySQLDatabases#Create a Database


    Step 5: Restore Database:
    Type in the following command, to restore database.
    Note: replace red with new database information:

    mysql -uUSERNAME -pPASSWORD DBNAME < /PATH/TO/backup.sql

    If your host is not “localhost” then you use the following command:

    mysql -hHOST -uUSERNAME -pPASSWORD DBNAME < /PATH/TO/backup.sql

    Please be patient as this process may take long time depending on the size of the db.


    Step 6: Restore Files:
    Now, we gonna use the zipped file we created in step 3. I recommend moving that file to a directory that you want to be the root directory for your new domain.
    If you have root access, and trying to move data from one account to another then use the following command.

    mv /PATH/TO/ backup.tar.gz /PATH/TO/NEW_FORUM_ROOT/

    or if you just want to copy the file then use following command:

    cp /PATH/TO/ backup.tar.gz /PATH/TO/NEW_FORUM_ROOT/

    now let’s unzip the file.
    Assuming that tarred or zipped file is in new forum directory, run following command:

    tar -zxvf backup.tar.gz



    Step 7: Point to new DB
    On new forum directory, go to library/config.php and open that file in any editor.
    Replace old database information with new one and save the file.


    Step 8: Admincp
    Now login to Admincp to new forum and change following:
    · Basic Board Information : change url and name

    Do the following if you wish to:
    · Facebook Integration (create new app)
    · Re run sitemap ( if you are using one)
    · Censoring (replace old forum name with new one) Optional.
    Step 9: Redirect
    Now, we have successfully migrated all the data from old domain to new one, it’s time to redirect all the traffic as well. In order to do that, we need to edit .htaccess file for the old domain name.
    Go to forum root directory of your old domain and insert following lines at the beginning of file.

    RewriteEngine On
    RewriteRule (.*) http://www.newdomain.com/$1 [L,R=301]

    Also, it is good idea to use Google Webmaster Tool(GWT) for better SEO performance. Add and verify new domain in GWT. Then go back to Configuration page of Old Domain and click ‘Change Of Address”, and from drop down menu choose new domain name. Google will automatically replace all the links of your old domain to new one from search result. This process may take few days. Also, do not forget to add sitemap to GWT for your new domain.
    Note: if it gives you error for changing address, then edit .htaccess file after you change the address at GWT.


    Step 10:
    Login to Xenforo Customers panel, click Edit Licence Details and enter new domain name.
    After that Go to Admin cp > Board Active and Check “Board Active”.
    Also, make sure that you have replaced the logo if necessary, setup all the ads, make sure all plugins are working fine and try to register at least one dummy id to see if registration process is working fine, and make some post to see everything is working well.


    Good Luck!!


    ПС: Надеюсь, что поможет.
     
    wagamata нравится это.
  3. Гептилл

    Гептилл Активный пользователь

    Регистрация:
    03.03.13
    Сообщения:
    91
    Симпатии:
    41
    Версия XF:
    1.3.0
    А в чём ценность данного текста на 90% состоящего из того как перенести БД и файлы на новый хост? На русском языке тоже самое можно прочитать в хелпе у любого нормального хостера. И потом: если человек меняет только доменное имя, зачем эти манипуляции с БД и файлами?
    Это, скорее уж, инструкция по переезду на новый хостинг.
     
    sanek9186 нравится это.
  4. asket

    asket Активный пользователь

    Регистрация:
    07.02.13
    Сообщения:
    152
    Симпатии:
    40
    Версия XF:
    1.2.0
    Прочитай сообщение №21.
     
  5. Гептилл

    Гептилл Активный пользователь

    Регистрация:
    03.03.13
    Сообщения:
    91
    Симпатии:
    41
    Версия XF:
    1.3.0
    Я не про то, зачем этот текст выложен тут (вашу ссылку на него я видел и выше сообщения №21), а про то зачем это человеку, которому надо просто сменить доменное имя?
     
  6. wagamata

    wagamata Местный

    Регистрация:
    07.05.13
    Сообщения:
    135
    Симпатии:
    13
    Версия XF:
    1.3.2
    Не прокатило:(
    При переходе на новый домен пишет:
    [​IMG]

    Что сделал:
    1. Создал бэкап БД и форума.
    2. В админке изменил урлы но новые.
    3. Через FTP переименовал папку форума со старого на новое доменное имя.
    4. Открыл Базу Данных формата .sql в Notepad++ и сделал замену урлов в БД со старых на новые.
    5. Восстановил БД.
    Не работает...:confused:

    Как быть?
     
  7. JayDee

    JayDee Местный

    Регистрация:
    13.08.12
    Сообщения:
    38
    Симпатии:
    9
    Версия XF:
    1.5.10
    а нафига ты в бд пути меняешь? :thumbsup:
     
  8. wagamata

    wagamata Местный

    Регистрация:
    07.05.13
    Сообщения:
    135
    Симпатии:
    13
    Версия XF:
    1.3.2
    Уже всё заработало!:cool:
     
  9. Гептилл

    Гептилл Активный пользователь

    Регистрация:
    03.03.13
    Сообщения:
    91
    Симпатии:
    41
    Версия XF:
    1.3.0
    А куда бы оно делось? :)
     
    wagamata нравится это.
  10. wagamata

    wagamata Местный

    Регистрация:
    07.05.13
    Сообщения:
    135
    Симпатии:
    13
    Версия XF:
    1.3.2
    Благодарю всех за помощь!
     
  11. Ruspb

    Ruspb Новичок

    Регистрация:
    09.05.13
    Сообщения:
    24
    Симпатии:
    4
    Сам недавно поменял домен и все работает как нужно, просто прописав в настойках новый. Xenforo классный!;)
     

Поделиться этой страницей