Support » Themes and Templates » Database postmeta table prefix defaults to wp- when using theme custom page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Its really strange, How you are sure that db prefix is changed, can you list down all the table of your DB.

    Thanks for your reply. It’s odd. I have the DB and my web page side by side in different browsers and can physically see the change when I refresh the screen. I’ve never had this happen before.

    A single entry in the _postmeta table in the meta_key column changes from _xxxxxxxx_page_template back to the wp default of _wp_page_template.

    _wp_page_template is default custom field which keep the template information. Nothing wrong with your setup.

    In codex.wordpress.org they advise changing the prefix to prevent SQL-injection attacks. I’ve used different prefixes in a DB before without a problem until now. Below is an excerpt from the codex:

    codex.wordpress.org/Hardening_WordPress

    Change the table_prefix: Many published WordPress-specific SQL-injection attacks make the assumption that the table_prefix is wp_, the default. Changing this can block at least some SQL injection attacks.

    Thanks.

    you need to check your WP db prefix you dont have to check DB value

    _wp_page_template is a meta property of your page which is saved in your db. have a look at all table which used in WP are http://codex.wordpress.org/images/9/9e/WP3.0-ERD.png

    In image you can see all name started with wp_ . ih your suggested article you need to change wp_ to xyz_ where xyz is your chosen prefix.

    You dont have to change the meta value as _wp_page_template is default keyword.

    http://jorgepedret.com/web-development/get-pages-by-template-name-in-wordpress/

    Thank you for explaining that to me, Pankaj. The information in the links make complete sense—much appreciated.

    I’ll now mark the topic as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database postmeta table prefix defaults to wp- when using theme custom page’ is closed to new replies.