Dinesh Roy
Dinesh Roy

Reputation: 183

How to use existing database in a WordPress website?

I already have a database. I have tried both manual and one-click installation of WordPress for my blog in a freehosting.com.

After one-click installation, by using phpMyAdmin, I removed the previously installed empty tables from the database and uploaded my tables from the database I already had. That didn't work (my blog showed nothing).

And after manual installation, I did the same. Now my blog opens but can't redirect to any page. It shows an error:

Not Found

The requested URL /page/2/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

How can I fix it?

Upvotes: 1

Views: 4903

Answers (2)

Dinesh Roy
Dinesh Roy

Reputation: 183

There was an issue with the compatibility of the database (older .sql) file for the newer WordPress version. I fixed it by installing the older version of the WordPress. Then I removed old tables and uploaded my own (old .sql) tables and upgraded WordPress and database. WordPress helped me to update the database by one-click. This fixed everything.

The old WordPress database consists of 12 tables but the newer version consists of 13 tables. This is why I had to install the older version of WordPress for the compatibility with the older version of the database.

Upvotes: 1

Mathew
Mathew

Reputation: 153

This happens because WordPress keeps links(permalinks) to all your posts and media files in database, to solve this issue you may have to change some settings

  • Go to Admin->Settings->General and change your WordPress address and site address
  • Go to Admin->Settings->Permalinks and review all permalink structure
  • If previous steps do not help got to phpMyAdmin select {your_prefix}options and change the value for 'siteurl' and 'home' fields to your site's url

Upvotes: 0

Related Questions