0

I have a wordpress instance with 150+ pages and a plugin. According to the page URL, plugin will bring contents(text and images) required for that page from a database. Can I use existing mySQL wordpress database to store this content also?

3
  • Isn't what Wordpress does this by default? Saving Page content to the Database? Not sure if is a question here. Commented Nov 17, 2017 at 7:46
  • Actually all my pages are blank pages. My plugin will dynamically fill the content in this pages from database. I want to know whether I can use wordpress db to store this content. At the moment plugin is retrieving content from an external database. This makes me manage two database.
    – Nidhin
    Commented Nov 17, 2017 at 9:12
  • Yes WP it will handle what you are asking and more. If you need help on the migration you can raise a new question to help you offering ideas and execution of the transition. Commented Nov 17, 2017 at 9:17

1 Answer 1

0

WordPress does this by default. It uses your existing MySQL database to store content from pages, posts and other types of content.

Take a look at the wp_posts and the wp_postsmeta tables in your database to find all your content stored there.

Also WordPress internally treats all pages as posts with a different post_type value (set to page).

See this for the present DB structure https://codex.wordpress.org/Database_Description

See this if you want to create the tables dynamically with your plugin https://codex.wordpress.org/Creating_Tables_with_Plugins

2
  • Actually all my pages are blank pages. My plugin will dynamically fill the content in this pages from database. I want to know whether I can use wordpress db to store this content. At the moment plugin is retrieving content from an external database. This makes me manage two database.
    – Nidhin
    Commented Nov 17, 2017 at 9:14
  • Ofcourse, you can store the content as part of the WP database, either in separate tables or use the existing ones if they fit your needs. See my edited answer for more details
    – LumberHack
    Commented Nov 18, 2017 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.