Title: How to Import articles or to rebuild the website
Last modified: August 19, 2016

---

# How to Import articles or to rebuild the website

 *  [robynica](https://wordpress.org/support/users/robynica/)
 * (@robynica)
 * [18 years ago](https://wordpress.org/support/topic/import-articles/)
 * Hi guys! I don’t Know if it’s the right section but I’m new and I’m Italian! 
   Sorry if I’m misunderstanding! We got a strange problem! We actually tried to
   change the template of our website and today the website itself disappeared, 
   there was only a white page. In fact we tried to change some features in order
   to widen the right and left borders of the page. Now we are tring to make a new
   website but we wonder if it’s possible to import all the articles we write before
   into the new website. You know, there was a lot of interesting stuff. Is there
   any way to save our work?!We’d rather prefer (if possible) to rebuild the old
   website because of our users and everything. Is there any solution? What can 
   we do? Thank you very much!
    Robynica!

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [eaglepost](https://wordpress.org/support/users/eaglepost/)
 * (@eaglepost)
 * [18 years ago](https://wordpress.org/support/topic/import-articles/#post-734904)
 * I’m by no means an expert, but if you didn’t overwrite the database, the posts
   and comments should still be there.
 *  Thread Starter [robynica](https://wordpress.org/support/users/robynica/)
 * (@robynica)
 * [18 years ago](https://wordpress.org/support/topic/import-articles/#post-734907)
 * Hi eaglepost! thanks for your answer!Do you know in what folder should we find
   our posts and comments? Actually there are 3 folders, i.e. /wp-admin, /wp-content,/
   wp-includes! Where am I supposed to look for?
 *  [eaglepost](https://wordpress.org/support/users/eaglepost/)
 * (@eaglepost)
 * [18 years ago](https://wordpress.org/support/topic/import-articles/#post-734909)
 * They would be in the mySQL database that was set up to support the application.
   You can find the specifics for that database in your wp-config.php file.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/import-articles/#post-734910)
 * posts and comments are **not** stored in files. [WordPress uses a MySQL database.](http://codex.wordpress.org/Main_Page)
 *  [raultbc](https://wordpress.org/support/users/raultbc/)
 * (@raultbc)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/import-articles/#post-735241)
 * I’ve got an interesting problem… I tried posting this under its own post ([http://wordpress.org/support/topic/130121](http://wordpress.org/support/topic/130121))
   but nobody answered.
 * Background at the above post – my ID sequence skipped due to fixing the mySQL
   database. What I want to do is somehow export the database posts and comments(
   or the entire DB) in such a way that I can import them back in and have the numbers
   reset so that there are no gaps.
 * Am I out of luck?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/import-articles/#post-735243)
 * Yes, you are.
 *  [beetle5](https://wordpress.org/support/users/beetle5/)
 * (@beetle5)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/import-articles/#post-735244)
 * To rebuild your website, here is what I did and what I did to rebuild:
 * I had difficulty upgrading to version 2.5 from version 2.0. Before upgrading,
   I followed the directions to save files and back up my database. After uploading
   the new files including the wp-config.php file. I could not get the execute the
   upgrade.php file from my browser.
 * As a result, I deleted all my files, reinstalled version 2.0 and opened my
    //
   domain.org/wordpress/wp-admin/upgrade.php instead of install.php. After uploading
   your files, DO NOT install “/wp-admin/install.php”… only upgrade.php to preserve
   your DB. I had a confirmation of an OK upgrade; however, I could not view my 
   index page that was blank when viewed in my browser. I could view all my posts,
   login, etc. My wp-config.php file was correct.
 * I was able fix the problem with my blank index page by editing the path to the
   wp-blog-header.php file in my index.php file.
 * Old index.php:
 * <?php
    /* Short and sweet */ define(‘WP_USE_THEMES’, true); require(‘./wp-blog-
   header.php’); ?>
 * New index.php:
 * <?php
    /* Short and sweet */ define(‘WP_USE_THEMES’, true); require(‘wp-blog-
   header.php’); ?>
 * The index page apparently thought I installed into root.
 * My files were installed in /wordpress folder. My index.php and wp-blog-header.
   php files were in the same folder; however, the path for wp-blog-header.php was
   listed as ./wp-blog-header.php. When I edited the index.php file to change the
   path to “/wp-blog-header.php”, it worked!
 * I hope this helps identify the source of this problem.
 *  [raultbc](https://wordpress.org/support/users/raultbc/)
 * (@raultbc)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/import-articles/#post-735246)
 * moshu:
 * This sounds like something I would have to do myself. I’m thinking of a process
   whereby I would extract all related tables for posts and comments from the database
   and rewrite output records based a new calculated counter.
 * To do this I would need a database diagram with dependencies identified. For 
   example:
 * wp_posts => (post_id) => wp_comments
    wp_posts => (post_id) => wp_postmeta
 * If I can get a data diagram of the database I can create an extract file, recreate
   the id values and import them into a new database. Then all I have to do is change
   the database name in wp_config.php to point to the new database and “presto!”…
 * Does this make sense? Do you think this will work? Is there such a diagram?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/import-articles/#post-735247)
 * _Does this make sense? _
 * No, it never does. It’s a OCD-thing, sorry. No offense…
    There are much more 
   internal relations involved between tables than you think: the post ID and the
   Cat ID etc. in several tables – terms, term_taxonomy, term_relationship +
 * Too much work to gain nothing.
 *  [jdorrill](https://wordpress.org/support/users/jdorrill/)
 * (@jdorrill)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/import-articles/#post-735343)
 * > I was able fix the problem with my blank index page by editing the path to 
   > the wp-blog-header.php file in my index.php file.
   > Old index.php:
   > <?php
   >  /* Short and sweet */ define(‘WP_USE_THEMES’, true); require(‘./wp-blog-
   > header.php’); ?>
   > New index.php:
   > <?php
   >  /* Short and sweet */ define(‘WP_USE_THEMES’, true); require(‘wp-blog-
   > header.php’); ?>
   > The index page apparently thought I installed into root.
   > My files were installed in /wordpress folder. My index.php and wp-blog-header.
   > php files were in the same folder; however, the path for wp-blog-header.php
   > was listed as ./wp-blog-header.php. When I edited the index.php file to change
   > the path to “/wp-blog-header.php”, it worked!
   > I hope this helps identify the source of this problem.
 * Perfect, thank you very much for this great tip! Saved my whole site.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘How to Import articles or to rebuild the website’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 10 replies
 * 7 participants
 * Last reply from: [jdorrill](https://wordpress.org/support/users/jdorrill/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/import-articles/#post-735343)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
