Wordpress Blog Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TiaLing
    Confirmed User
    • Mar 2006
    • 979

    #1

    Wordpress Blog Question

    Is their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !


    Trade Traffic and hardlinks
  • jimmy-3-way
    Confirmed User
    • Jun 2001
    • 3861

    #2
    Originally posted by TiaLing
    Is their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !
    Export posts, rename, import posts.

    You're welcome.
    Make money offa that Asian honey - www.eroticmp.com.

    Comment

    • GrouchyAdmin
      Now choke yourself!
      • Apr 2006
      • 12085

      #3
      list and rename all of your tables, update wp-config.php. Looks like you forgot to do the latter.

      For anyone who wants to automate this, here's a sample quick 'howto' automate doing the table renaming. It's not what I'd call quality code. It is smart enough to only rename tables that start with the given specific prefix:

      Code:
      <?php
      $oldtable="wp_";
      $newtable="mywp_";
      mysql_connect("localhost", "mysql_user", "mysql_password");
      $result = mysql_list_tables("mydb");
      $num_rows = mysql_num_rows($result);
      for ($i = 0; $i < $num_rows; $i++) {
        if (eregi("^".$oldtable, $mysql_tablename($result, $i))) {
          $table = mysql_tablename($result, $i);
          mysql_query("rename table $table to ". str_replace($oldtable, $newtable, $table))
            or die("Could not rename $table.");
          echo "Table: $table renamed";
        }
      }
      Remember to edit wp-config.php.
      Last edited by GrouchyAdmin; 06-10-2010, 01:38 PM.

      Comment

      • cyber
        Confirmed User
        • Jan 2004
        • 182

        #4
        to all reading this: this is a very important step that everyone should take. it adds just a tiny bit of security to your WP installation, and should not be missed!

        "wp_" is the default table prefix. To choose a new one, close your eyes and hit the keyboard a few times: "wjnif9494_".

        Comment

        • GrouchyAdmin
          Now choke yourself!
          • Apr 2006
          • 12085

          #5
          Originally posted by cyber
          to all reading this: this is a very important step that everyone should take. it adds just a tiny bit of security to your WP installation, and should not be missed!

          "wp_" is the default table prefix. To choose a new one, close your eyes and hit the keyboard a few times: "wjnif9494_".
          Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.

          Comment

          • Supz
            Arthur Flegenheimer
            • Jul 2006
            • 11057

            #6
            Originally posted by GrouchyAdmin
            Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.
            That is the answer I would expect from a Grouchy Admin

            Comment

            • TiaLing
              Confirmed User
              • Mar 2006
              • 979

              #7
              thanks for the info ... very helpful ... question, though .... I'm told to do this for security , of course, but i've also been told it helps with seo ? Especially if you rename with a keyword instead of closing your eyes and hitting the keyboard, lol, any truth to this or no ?


              Trade Traffic and hardlinks

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                Originally posted by TiaLing
                Is their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !
                install this plugin

                http://wordpress.org/extend/plugins/wp-security-scan/

                it has an option to rename your db from wp_ to whatever via the plugin, then deactivate it.
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                • fris
                  Too lazy to set a custom title
                  • Aug 2002
                  • 55679

                  #9
                  Originally posted by GrouchyAdmin
                  Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.
                  never been hacked myself, i doubt i will ever be either.
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                  Comment

                  • TiaLing
                    Confirmed User
                    • Mar 2006
                    • 979

                    #10
                    Originally posted by fris
                    install this plugin

                    http://wordpress.org/extend/plugins/wp-security-scan/

                    it has an option to rename your db from wp_ to whatever via the plugin, then deactivate it.
                    I did try this .... however program kept telling me there was permissions issues even though i had set them all correctly and made config file writable, however, the writer of the plugin offers a nice description of how to do manually. So problem taken care of ! Thanks !


                    Trade Traffic and hardlinks

                    Comment

                    • $5 submissions
                      I help you SUCCEED
                      • Nov 2003
                      • 32195

                      #11
                      Originally posted by GrouchyAdmin
                      Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.
                      Sadly, the above is true.

                      http://www.ixdownload.com/news/wordp...protected.html

                      Comment

                      • Aka_Bluey
                        Confirmed User
                        • Sep 2007
                        • 631

                        #12
                        This could be worth a look, have not tried it, but might be what you are looking for.
                        WP Prefix Table Changer
                        http://blogsecurity.net/wordpress/tool-130707
                        Things that make ya go hmmmm....

                        Comment

                        • fris
                          Too lazy to set a custom title
                          • Aug 2002
                          • 55679

                          #13
                          Originally posted by $5 submissions
                          you need to be up to date with any software, if you leave a linux box with old exploitable software it can be hacked as well.

                          This applies to any software.
                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                          Comment

                          Working...