Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
in Q2A Core by
how can i move whole website with database to another web hosting ?

1 Answer

+3 votes

You need to export a backup of the database (e.g. with phpMyAdmin) then import it into the new hosting. The process I would use is:

  1. Register with the new host.
  2. Upload all files to the new host (but don't run the site install). If you have file uploads stored on disk you'll need to download those from the old host and upload to the new one.
  3. Set the old site to maintenance mode (checkbox on Admin > General page). This stops people adding new posts to the old site before you've moved it.
  4. Back up the database from the old site.
  5. Import it into the new site.
  6. Update any necessary details in qa-config.php such as database name/password.
  7. If you're using the same domain name you'll need to update the nameservers/DNS to point to the new host.
  8. Once the domain has transferred you can log in on the new host and turn off maintenance mode. Hopefully everything is working :)
thanks Scott...
hey scott what is mean by Database is limited to: 1 GB of data and 150 tables.
what is mean by 150 tabels ?
is that means 150 questions or what?
Tables in a database are used to store data, so the qa_posts table stores all the posts in the site, qa_users stores all the user accounts, and so on. There are about 30 tables in Q2A. Plugins may add more but it's very unlikely you'll get to 150.

It's also unlikely you'll reach 1GB of data unless you have a HUGE amount of content. The db on my site that's been running for years is still less than that.
Hi, Scott.
The database on my site has  7,454.7 MB
Can this be a problem?
@Jonatan Wow, that's pretty huge! But to clarify 1GB is only a problem in the context of this question, because Zeeshan has a 1GB limit on the database. Presumably you have no limit on your db.

Having said that, a database that large could make things a bit slower. How many questions and answers do you have? What are your biggest database tables?
Hi Scott.

204964 questions.
1594005 answers.
6513 users.

Larger tables (lines):
qa_contentwords (20242395)
qa_eventlog (12049659)
qa_iplimits (339470)
qa_posts (2937409)
qa_sharedevents (1087035)
qa_uservotes (1571630)
qa_words (637828)

Larger tables (size):
qa_contentwords (2 GB)
qa_eventlog (2,4 GB)
what is your website?
Hi Zeeshan.
I'll send in a message for you.
Help me with ur website
how to replace all the old urls inside the posts with a new one from the database(myphpadmin)?