Saturday, September 17, 2016

Growing Your Email List 6 Digits and Beyond [Upcoming Webinar]

Looking to grow your email subscription list by colossal amounts? Join Syed Balkhi of WP Beginner and OptinMonster on Wednesday, September 28th at 11 a.m. CDT for a free webinar discussing some of the best ways to give your email list a massive boost in subscriptions. Sign up here:


How to grow your email list six digits and beyond


Building a bigger email list is important for many reasons. It builds a relationship between your brand and followers by delighting them through engaging content. Emails can also attract readership, converting readers into prospects.


Get smart with your email growth tactics by watching this informative session where the following tips will be covered:



  • The No.1 trick to increase email subscribers in less than five minutes

  • How to solve the biggest list building problem before you even encounter it

  • The exact workflow Syed used to grow his email lists

  • A simple psychology principle proven to increase conversions by mammoth amounts

  • And more!


This is surely a webinar you don't want to miss! Can't attend? Sign up anyways and we'll send you a link to view the recorded session after the live one airs.


REGISTER NOW


Hope to see you there!


The post Growing Your Email List 6 Digits and Beyond [Upcoming Webinar] appeared first on WP Engine.

Zippythemes.com for Sale

We have just put zippythemes.com for sale. This is a great domain for anyone looking to enter the WordPress themes market with their own themes store.

If you're interested in acquiring the domain please fill in the form below to get in touch. Serious offers only please.


How to Change Sender Name in Outgoing WordPress Email

Do you want to change the default sender name and email address for outgoing WordPress emails? By default, WordPress uses 'WordPress' as the sender name for all outgoing WordPress notification emails. In this article, we will show you how to change the default sender name and email address in outgoing WordPress email.


Changing default sender name and email address in WordPress outgoing emails


Why You Should Change the Default Sender Information in WordPress?


The default WordPress sender name is 'WordPress' which sends emails from a non-existent email address (wordpress@yourdomain.com) as the sender email.


Many spam filters block your WordPress emails believing it to be spam. Sometimes it does not even make it to the spam folder.


For more on this topic, take a look at our guide on how to fix WordPress not sending email issue.


The outgoing email notifications are important, and you should use your own brand and email address. This increases the authenticity of your brand and increases name recognition among your users.


Having said that, let's see how to change the default sender name and email address in outgoing WordPress email notifications.


Method 1: Changing Default Sender Name and Email using a Plugin


First thing you need to do is install and activate the CB Change Mail Sender plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you will notice a new menu item labeled CB Mail Sender in your WordPress admin bar. Clicking on it will take you to plugin's settings page.


Mail sender options


You will need to enter the name and email address you want to be used for outgoing WordPress emails.


Don't forget to click on the save changes button to store your settings.


That's all, all your WordPress notification emails will now show the name and email address you entered in plugin settings.


Bonus tip: You should use a professional email address. See our guide on how to create professional business email address.


Method 2: Manually Change Sender Name and Email Address


This method requires you to paste code into your WordPress files. If you are new to adding code in WordPress, then take a look at our beginners guide on pasting snippets from web into WordPress.


You will need to add the following code in your theme's functions.php file or a site-specific plugin.




// Function to change email address

function wpb_sender_email( $original_email_address ) {
return 'tim.smith@example.com';
}

// Function to change sender name
function wpb_sender_name( $original_email_from ) {
return 'Tim Smith';
}

// Hooking up our functions to WordPress filters
add_filter( 'wp_mail_from', 'wpb_sender_email' );
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );


This code simply replaces the default WordPress sender name and email address with your custom sender name and email address.


You can test this by adding a new user, changing password, or any other action that sends WordPress notification email.


We hope this article helped you learn how to change sender name and email address in outgoing WordPress email. You may also want to see our guide on how to send email to all registered users in WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Change Sender Name in Outgoing WordPress Email appeared first on WPBeginner.


How to Move a Single WordPress Site into a Multisite Network

One of the most frequent questions I've been asked by students completing the WordPress Multisite course in The Academy is this: how do you move an existing WordPress site into a Multisite network?


This post is designed to answer that question and take you through the steps you need to follow to move a site into a network. I'll look at:



  • How to use the Import/Export tool to migrate content.

  • How to use the Widget Settings plugin to migrate widgets.

  • How to tidy up afterwards.



Choosing a Migration Method


In this post I'm going to show you the easy way to migrate your site, using a couple of plugins. This has the advantage of being quick and easy, and for most sites it will migrate almost everything you need.


But if you've made a lot of customizations to your site using the Customizer, or you've spent a lot of time setting up your plugins, this method won't migrate all of that. You can either take the time to manually tweak everything again (see the final part of this post) or you can manually migrate the site by copying the relevant database tables.


Migrating the database tables involves using phpMyAdmin to download database tables, editing the resulting sql file and re-uploading that using phpMyAdmin again. It saves you having to do any tidying up at the end but can be a bit daunting. I'll cover that in a separate post – if you don't feel up to that, by all means follow the instructions here.


So let's get started!


Before You Start


But wait. Before you start, there's a very important thing you need to do. Back up your sites. Make a backup of the site you want to move AND your network. Just in case. Use your favorite backup plugin (it's Snapshot Pro, right?).


Ready? Now you can get started.


Exporting Content from the Old Site


WordPress provides a tool you can use to easily import and export your content. Let's start with that. Open up your starting site. Here's mine:


Starting site for migrating

In the admin screens, go to Tools > Export:


WordPress exporter screen

Unless you just want to export certain post types, keep the All content option selected and click the Download Export File button. WordPress will create an XML file and download it to your computer.


Creating a New Site in Your Network


Now open the network into which you want to import your site. Start by creating a new site in the normal way.


Installing and Activating Plugins and Themes


Before you import content, install the same theme you were using in the old site on your network and activate it for your new site. Do the same for any plugins.


If you're not sure how to install and activate themes and plugins on your network, see our guide to configuring Multisite.


Importing Content to Your New Site


Now, before you import the content from your old site, go into the Posts and Pages listings in the admin screens and delete any dummy content that's been created for you when you created the site. Delete any widgets too. You should have an empty site.


Before you can import the content from your old site, you'll need to install the WordPress Importer plugin. Go to your Plugins screen in the network admin and install that (you'll need to search for WordPress Importer).


Now in your new site's admin screens, go to Tools > Import and scroll down to WordPress at the bottom of the list. Click the Run Importer link.


WordPress will ask you to select a file to upload:


WordPress importer screen

Click the Choose File button and then select the file from your machine (it will be in your downloads folder unless you've moved it). Remember you're looking for an XML file. Once you've done that, click the Upload file and import button.


The importer now wants to know if you want to assign content to existing authors on your network, or import authors:


Importing authors using the Import tool

Select whichever option applies to you. I'm assigning my posts to my existing username, but if you're running a multi-author site you may need to import authors.


Finally, select the Download and import file attachments option to copy media files from your old site and insert them in the correct place in your new one. This is one of the most useful features of the importer as far as I'm concerned and I've never yet come across a site where I didn't check that box!


Click Submit and the importer will work its magic.


Eventually you'll see the All done! message. Take a look at your Posts admin screen to see the posts that have been imported: you'll find pages too.


So that's your content imported. Next, let's import widgets. You can do this with another plugin.



MULTISITE


We are the Multisite Experts. Period.


We've been developing plugins for WordPress Multisite for the past 10 years. With WPMU DEV you get our most popular plugins like Domain Mapping, Snapshot, Pro Sites, Support System, User Switching and bucket loads of others tailored specifically for Multisite! Woop!


LEARN MORE




Migrating Widgets


Before you migrate any widgets, make sure you've got the same themes and plugins activated on your new site as on the original site. While you're adding plugins, install the Widget Settings Import/Export plugin and activate it on your new site.


Note: Widgets go into widget areas defined by your theme, so if you haven't activated the correct theme this step won't work correctly. And if there are any widgets provided by plugins, they won't be imported if you haven't installed the plugin on the new site.


Now go to the admin screens for your old site and install and activate the widget settings plugin there too. Go to Tools > Widget Settings Export to see the exporter screen:


Widget export screen

Unless you just want to select some of the widgets from your old site (and not all of them), select the Select All Active Widgets checkbox. Click the Export Widget Settings button to download the export file.


Now switch to your new site, and go to Tools > Widget Settings Import:


Click the Select a file button and find the file where you downloaded it. Note that you're looking for a son file this time, not an XML file. Then click the Show widget settings button to see the widgets in the file:


Widget import screen

Select the widgets you want to import, or just click on the Select All Active Widgets button, and make sure the Clear Current Widgets Before Import button is selected. Then click the Import Widget Settings button.


Now got to your new site and check how similar it is to the old one:


final-site

Tidying Up


The two importer plugins you've used import the content of your old site to your new one but they don't import all of the settings. This means that you'll have to make some manual tweaks before you're done.


This might include:



  • Editing the site title and description.

  • Making any customizations to the site design you may have made in the Customizer or theme options screens.

  • Editing any plugin settings. Open both sites in separate windows in your browser (or in separate browsers) and check your settings for your old site, then implement them in your new one.

  • Checking that the correct navigation menus have been added to the correct menu areas in your theme. The importer plugin copies menus across but might not have assigned the right one to your primary menu if you've got more than one.


If you've got a domain you want to transfer across from your old site, you'll also need to map that to the new site in the network. Once you've copied everything across you'll need to edit the DNS for your domain to point it at your network. You'll also need to use the Domain Mapping plugin to get things working correctly in your network. For full instructions on this, see our guide to domain mapping.


Migrating Into a Network Is Easier Than You Think


I know from the questions lots of people have asked me about this that the prospect of moving a site into a Multisite network can be pretty scary. But as you now know, it needn't be difficult. In fact, you might want to bookmark this tutorial so you've got it on hand for the next time you want to migrate a standalone site into Multisite.


By following the instructions above, you can move your site (or your client's site) into a Multisite network with minimal hassle.


Saturday, September 10, 2016

SUMO Subscriptions – WooCommerce Subscription Plugin

SUMO Subscriptions for WooCommerce is the most comprehensive WooCommerce Subscription Plugin. It has tons of features using which you can sell subscriptions in your WooCommerce shop. Feel free to contact us with new feature requests.


Fixing the “Are You Sure You Want to Do This” Error in WordPress

The vaguest WordPress error you'll no doubt come across at some point, which also has a whole laundry list of probable causes, is…


“Are you sure you want to do this?”


What's frustrating about this particular error is that it could mean you made a small fixable mistake or, worse, that you've been hacked (though typically it's a security issue that's easily fixed and not always the case).


Today, we'll uncover the meaning of this mysterious error, when and why it happens, as well as troubleshoot techniques and fixes.



Getting an Error Accidentally on Purpose…


Unfortunately, the “Are you sure you want to do this?” error can happen while you're trying to accomplish a wide variety of tasks:



  • Publishing posts or pages

  • Inserting an image into a post

  • Customizing a theme

  • Creating tags or categories

  • Uploading a theme or plugin

  • Updating WordPress core or plugins and themes


This isn't by any means a complete list, but it should give you a good idea of when this error could occur.


When the error appears, it's the only thing that's displayed other than a link to try again, though, a second attempt usually doesn't work.



Are you sure you want to do this error
The vague error on an otherwise blank page.


It may seem as though this is an odd error in its phrasing since it's not specific. The phrasing makes sense because there are so many potential causes and most of the time it's an error that's caused on your end. Either you made a mistake or the developer who created the plugins and themes you use made the mistake.


The wording of the error is specifically set to make you pause and think about what happened and if it's possible that you made the mistake after all.


Here are some of the most common reasons for the error:



  • You selected an incorrect file when trying to upload a theme or plugin

  • An improperly coded theme or plugin

  • You reached your PHP memory limit

  • A security issue


Before exploring troubleshooting steps and fixes, it's important to explore the possibility that there's a security issue since this would be a serious problem that would require special attention in order to protect your site.


What's Security Got to Do with It?


In many cases, the error pops up when you try to complete an action that requires certain user permissions, but WordPress isn't able to verify that you have access.


WordPress uses security tokens, often called nonces. They're used to validate a user to verify that they are the owner of their account and they have the correct user role to complete the action they started.


If WordPress isn't able to verify the security tokens, the error displays.


If your site is the subject of an attack, especially in cases of cross-site scripting (XSS) or cross-site request forgery (CSRF) attacks, you might see the error in the midst of an attack.


It could also occur if a plugin or theme has a security vulnerability or isn't otherwise properly coded.


If this is the cause, installing and using a security plugin like Defender can help you locate and fix the vulnerability and end an attack in a few clicks. For other causes of the error, you can try the troubleshooting steps and fixes below.



SECURITY


Ultimate WordPress security with WP Defender


Defender protects you against evil bots and hackers with automated security scans, vulnerability reports, safety recommendations, blacklist monitoring and customized hardening in just a few clicks.


FIND OUT MORE




Holding Out for a (Super Support) Hero


Let's take a look at several troubleshooting methods and fixes to help you resolve this error. And if you run into any troubles along the way, contact our expert support team for any kind of WordPress-related issue.


If you're already a WPMU DEV member, our premium 24/7 support is better than free because it's already included in your membership. There's no need to sign up for anything else or fill out any forms. If you're not a member yet, you can still get premium support for free with our 14-day trial.


Fix #1: Clear Your Cache


It's not always a fix that works, but sometimes all it takes to resolve this error is to clear your browser's cache. If that doesn't work, you can try clearing your cookies as well. You can check out the post How do I clear my web browser's cache, cookies, and history? for details on how to do this across the major browsers.


Fix #2: Plugin or Theme Upload Error


If you tried to upload a theme or plugin and the error occurred, then the likeliest cause is that you tried uploading a plugin or theme package rather than the ZIP file for only the theme or plugin.


These packages often include the theme or plugin ZIP file along with other useful documents such as instructions, demo content, licensing information and other similar files. Unzip the package, then try uploading the plugin or theme file that you find among the extracted files.


Fix #3: PHP Memory Limit Reached


In cases where you may have reached your PHP memory limit, you can check out one of our other posts, How to Increase the Maximum Upload and PHP Memory Limit in WordPress, for the fix you need.


Fix #4: Revert to the Default Theme


You can also try to activate the default WordPress theme if you're using one you selected from the Theme Repository or from a theme developer.


In cases where you're having troubles accessing your plugins, you can access your site's files through FTP, SSH or cPanel. Rename your theme's folder under /wp-content/themes/your-theme/ to manually deactivate it temporarily.


You can name the folder anything you want, but it's a good idea to keep the original name intact so you don't forget which theme the folder is for when you go back to it later. For example, you can rename the folder to include -deactivate at the end or something similar.


If the error goes away, the theme you were previously using is the culprit.


To fix it, you would need to contact the developer and let them know so they can create a patch and release a fix.


Fix #5: Delete or Deactivate Your Plugins


Similarly, you can see if any plugins you're using are the cause of the error. Sometimes deactivating them doesn't quite do the trick even though it's the cause so the first thing you should try is deleting all the plugins you're using.


If you don't have access to your plugins page, you can use FTP, SSH or cPanel to delete the folders you find under /wp-content/plugins/. You can also rename the folders as described above if you really don't want to delete the plugins you have installed.


Try repeating the last action you tried before the error popped up. If everything goes off without a hitch, then one of the plugins you were using is responsible.


Install and activate them one-by-one until the error comes up again. If you renamed the plugin folders, change them back to the original title to re-activate them.


When you see the error, that's how you can determine that the last plugin you activated was the culprit. At this point, you would need to contact the plugin developer so they can fix the issue.


Fix #6: Reset Your Security Keys


Another fix you can try that usually does the trick is to reset your security keys. You can find the details in our post How to Tweak wp-config.php to Protect Your WordPress Site.


If you prefer an option that doesn't require touching code, you can install our Defender security plugin and reset your security keys in one click. Once it's activated, go to Defender > Hardener in your admin dashboard.



The Hardener page
You can harden your site's security with Defender.


Click on Update old security keys under the Issues section, then review how often you would like a reminder to update your security keys. This step is optional, but it's also helpful because it increases your site's security.


You can choose from the following times:



  • 30 days

  • 60 days

  • 90 days

  • 6 months

  • 1 year


Once you have made your selection in the drop down box, go ahead and click the Regenerate Security Keys button to update your site's security tokens automatically.



Section once the accordion tab for updating security keys has been clicked.
You can choose how often security keys should be updated.


Keep in mind that once the update is complete, you will need to log in again.


Once you're logged in, check to see if the issue has been resolved. Even if you're free and clear, don't uninstall Defender. It can help you keep your site secure on an ongoing basis.


You've Been Hacked!


If none of these troubleshooting steps or fixes resolve the error, you may have been hacked. You can go to Defender > Scan to start a search for any vulnerabilities. If any are found, you can patch them up immediately and in one click.


You may also find the following articles helpful for cleaning and securing a hacked site:



Keeping your site secure should be a priority since you could lose more than your site including your personal information and that of your users. These articles can help you keep your site and information safe.


Conclusion


There are a ton of reasons why the “Are you sure you want to do this?” error is displaying on your site, whether it's human error or the result of a security vulnerability. In any case, you're now armed with the tools you need to troubleshoot and fix this error.


It may also be helpful to note that Defender also features audit logs to help with the troubleshooting process and keep an eye on everything that happens on your site, from login attempts to creating new posts. You can check to see what users accessed and when to help you determine the cause of this annoying and equally mysterious error. Check out Track Hackers in Real-Time with Defender's All New Audit Logs for more details.


Saturday, September 3, 2016

Changing Your WordPress Database Prefix to Improve Security

WordPress database tables all begin with the wp_ prefix by default. Security gurus often recommend changing the prefix to secure your site, but is it really worth doing? Or is it all sizzle and no steak?


The idea is that changing the database prefix helps avoid nasty SQL injections since hackers usually use queries with the standard settings in their attack, but if the database details are unique the hacker would get an error.


While updating the fix is by no means the best or only solution for protecting your site, it's one step you can take to make your WordPress install that little bit more secure.


So in this post, I'm going to run you through why and how changing your WordPress database prefix can add to your site's security. If you missed the option in the famous 5-minute install, not to worry. I'll also cover how to make the change manually with phpMyAdmin, SQL queries, the wp-config.php file as well as the much easier, one-click method using our Defender plugin.



Keep in mind that at any point, if you get stuck trying anything in this post or anything, ever for that matter, you can ask our expert support team for help. If you're already a WPMU DEV member, you're all set to ask your question. If you're not a member yet, you can sign up for a premium account for free and ask away.


What's Prefix Got to Do with It?


To understand why changing your database's tables prefix could help as a part of your site's preventive measures against attacks, it's important to explore the both sides of the argument. Knowing the reasoning behind the amendment should give you a better idea of what it takes to keep your site secure.


That's all well and good, but why is it a popular practice to change the table prefix in the first place?


SQL Injections and the Common Recommendation


When you're checking out the pros and cons, it's important to note that the main reason why it's widely recommended to rename your table prefix is to prevent a hacker from overtaking your site with a successful SQL injection.


In short, when your site is vulnerable to an SQL injection, it means that a hacker can execute an SQL query from an unsanitized form on your site without your permission or knowledge. If a hacker can successfully run an unauthorized SQL query on your site, it means that there's an open connection to the target database. When this happens, a hacker can change whatever they want and gain full access and control over your site.


When this happens, a hacker can change and do whatever they want with your site since the database is fully exposed to them. They wouldn't necessarily have access to your files, but they would have full reign over your database.


They could gain full access and control to your site and the first task is usually changing the admin login credentials. This locks you out and lets them continue going about they way, making a wide range of changes from making your site turn into spam central and stealing personal information to infecting thousands of others sites where they can spam it up and steal all the more.


It's certainly something you want to protect your site from and you can get more details on SQL injections and its prevention by checking out The Ultimate Guide to WordPress Spam.


Cons


The main reason against renaming anything in the database is that if a hacker can execute an SQL injection on your site, there's already an open connection to your database. This means that if their first SQL query fails, it's easy enough for the hacker to run a query searching for the second half of the table names that are almost always identical to the default.


The second query could search for names including usermeta and postmeta. The search would turn up the full table name and voilĂ ! Your hacker reads your new prefix. From there, they could continue doing what they wanted.


This is also assuming they didn't have access to your files as well. If they did, they could easily find your new prefix there as well.


At the end of the day, if your site and database aren't vulnerable with an open connection, then it doesn't matter what your table prefix happens to be and if there is an open connection, a hacker could easily figure out what you named your prefix making it useless.


Pretty cut and dry, right? Well, not exactly. There are a couple factors and one major one that's left out of the picture here.



Changing your database prefix is just one small measure you can put in place to help prevent attacks on your WordPress site.
Changing your database prefix is just one small measure you can put in place to help prevent attacks on your WordPress site.


Pros


While it may seem like a pointless endeavor after considering the cons, it's not like there's no president for thinking renaming the prefix works.


For one, it's a suggestion in the WordPress Codex for Security Hardening. Also, code injection vulnerabilities have been detected in WordPress starting as early as the first version 0.7 and again in future versions such as 1.5.1 where one of the first known mentions of renaming the prefix to thwart attacks was published.


Vulnerabilities have been consistently squashed since WordPress' inception, but they started out being available on numerous sites for hackers to exploit. That's why adding a little precaution can be a valuable asset to your many security measures.


There's also a reason why renaming your table prefix has been lumped into the “security essentials” label for over ten years.


Hackers rarely find out about a site's vulnerability by visiting them through a known browser like the rest of us do every day. Instead, they commonly use a program they create that's commonly referred to as a bot. They start up the bot and it systematically goes to hundreds if not thousands of sites in the matter of minutes to automatically search for vulnerabilities.


Once a vulnerability is found such as the one that allows for an SQL injection, the bot then submits queries to hack all the vulnerable sites at the same time. Out of the sites that are successfully hacked, the bot continues from there.



SECURITY


Ultimate WordPress security with WP Defender


Defender protects you against evil bots and hackers with automated security scans, vulnerability reports, safety recommendations, blacklist monitoring and customized hardening in just a few clicks.


FIND OUT MORE




But on the other hand, if some site admins have changed their table prefix, then the bot wouldn't be able to successfully execute their first query since it only accounted for the default settings and would move onto sites where the query worked. If your site were one of the ones where the prefix was changed, then your site would essentially be “safe” for the time being.


Keep in mind that in this situation, your site would still have a major vulnerability so if it's not patched up immediately, it's potentially only a matter of time until a hacker gets their squirmy  fingers in there – so to speak.


This is why changing your database table prefix isn't your be-it-end-all security solution. Far from it, actually. While it can help the fight against hackers, it's crucial to have a security plugin installed like Defender to truly secure your site.


While changing your database table prefix isn't the be-all-end-all of security measures, it's still worth the effort applying it to your site, among your other security essentials. Read on to find out how to make the change to your site.


Like I'm Gonna Lose You


Since you're going to be changing your database in a fundamental way that could completely break your site, it's important to make a backup of your entire site as if you were going to lose everything. That way, if you do, you can easily restore your site so you don't end up losing everything for good.


For details on how to create a full backup of your site, check out some of these articles:



Once you have created a backup of your site, you can start changing your table prefix.


The Files, They are A-Changing


To rename your table prefix, first start with your wp-config.php file. You can either download a copy to edit it, then reupload it to your site via FTP or the command line and SSH or you edit it directly in cPanel.


After logging into cPanel, go to Files > File Manager and locate your site's files. Click on the wp-config.php file from the list, then click Edit at the top of the page.


In the editor, locate the following line:




Change wp to whatever you want, but it's recommended that you keep the underscore after it intact. Your new prefix can contain letters, numbers and even underscores. For example, you could choose something like wp2748il0ved0gs, sg7bn40dg or ug44_db87, but don't use these exact examples since they're public and everyone can see them including hackers.


Once you're happy with your changes, save the file. If you used FTP or SSH, upload the file back to your site and replace the old version.


You're not done yet and you may even notice your site is completely broken now. That's normal since your database's data doesn't match your changes. To fix this and finish renaming your prefix completely, go ahead and move on to updating your database.


Rolling in the Database


To start making the change to your prefixes in your database, log into phpMyAdmin so you can run some queries. For details on how to run SQL queries in phpMyAdmin, check out that section in one of our other posts 10 Tips for Keeping a Squeaky Clean WordPress (and Multisite!) Database.


You can enter your queries, line-by-line to change the main tables in your database. The structure you should follow for all your tables is below:




Don't forget to replace tablename with the actual name of the table as well as change newprefix to the new prefix you saved to your wp-config.php file.


For single installs of WordPress, you can enter these queries, but don't forget to change newprefix to the real prefix you created:




For Multisite networks, also add on these queries remembering to also replace newprefix with the new prefix you chose:




Beyond these queries, you also need to add any custom tables that plugins on your site have created as well as all the tables that are created for each subsite in your network.


Here's a list of the site tables you should also include in your queries list:



  • wp_#_commentmeta

  • wp_#_comments

  • wp_#_links

  • wp_#_options

  • wp_#_postmeta

  • wp_#_posts

  • wp_#_terms

  • wp_#_term_relationships

  • wp_#_term_taxonomy


Be sure to replace # with the site ID of your subsites. For example, you would include wp_2_commentmeta in your query for your subsite with the site ID of two.


For more information on database tables, check out one of our other posts MySQL and WordPress: Understanding How Databases Work.


Some Table That I Used to Know


When this part is done, you still need to update some entries in the options and usermeta tables mentioned above.


Update Options Table Entries


There are going to be quite a few entries you need to update in the options table and you can search for them with a query to make the process easier.


Use the following query to run a search on the options table and don't forget to update newprefix with the actual prefix you chose:




The search should retrieve a list of all the tables that need to be updated. You can click the edit buttons for each one to make the change.


Update Usermeta Table Entries


Similar to the options table, the usermeta table also needs many of its entries updated. Instead of looking for them one-by-one, you can search for them as well.


Here's the query you can use to search for entries that include the default prefix:




Be sure to rename newprefix to the real prefix you wrote into your wp-config.php file.


Finally, edit all the entries that appear in the search results to reflect your new prefix.


Won't Get Fooled Again


You're pretty well done updating your database table prefix to something completely custom, but the final step is to create one more full backup. Once that's done, you can go to your site and bask in its glory. While nothing has changed on the front end, you made a step toward a more secure site.


Although it's not the only security measure you should take, it's an added measure that can help protect you against hack bots that systematically try and infiltrate sites and their databases en masse.


If you visit a site and you get a “permissions” or “database connection not established” error, you forgot to rename one of the tables or entry prefixes. It's important to go back into phpMyAdmin and search for the tables or entries you forgot to change. You can also check out How to Fix “Error Establishing Database Connection” for WordPress to get more details.


Some plugins rely on the default database prefix so if you're sure you haven't missed updating and tables or entries, you can disable all your plugins and re-enable them one-by-one until your site breaks. The last plugin you activated is the culprit and you should consider deleting it and finding an alternative.


If you would rather not touch any code, you can use our Defender plugin to update your database table prefix in one click and to also secure your site further to make sure you don't get burned by hackers in the future.


To change your prefix in Defender, install and activate it, create a full backup of your site, then go to Defender > Hardener and click on the Change default database prefix bar to reveal more information.



The Hardener page.
Click the options on the list to harden your site's security.


You should see some more information and an option dynamically appear.


Enter the new prefix you want to include and update in your database, then click the Update button. That's all you need to do. At this point, Defender works to change your database and wp-config.php file for you and it should only take a couple seconds.



The change prefix option in Defender.
You can enter the new prefix that you want, then click the Update button to complete the change.


When the job's done, you'll see the option moved to the Resolved section toward the bottom of the page. Be sure to create another backup when you're done.


If you run into troubles along the way, feel completely free to ask our support team. After all, that's what they're there for and there's someone available to help you 24/7. If you need to ask a question in the middle of the night, don't worry, we don't mind one bit!