Archive

Category Archives for "Database"
5

Optimizing Your WordPress Blog For Speed

If you want to speed up your web site, you must address the core issue, which is — your web site is getting more traffic than your web server (web hosting account) can handle.

So here are a few ways in which you can speed up your web site:

  • The easiest thing you can do is to revisit all of your plugins that you have enabled and see if you still need all of them. Remember that every single additional plugin running on your site, adds some overhead to (basically, “slows down”) your web site or blog. So use only as few plugins as you absolutely must. With so many cool plugins freely available for WordPress, it is very easy to get carried away, and install tens of plugins, most of them adding very little value, but sometimes causing the most overhead in terms of server resources. So keep only a bare minimum of other plugins (some social plugins are a real pain – making calls to third-party web sites to get their information from).
  • Using a “cache” plugin for speeding up your site is like putting band-aid on a gaping wound. It’s only a temporary fix, and not a real long-term solution, but every bit helps. We recommend WP Super Cache, and be sure to whitelist all of your member pages from getting cached.
  • Make sure you are always using the latest version of WordPress, or at worst, one version behind the very latest and greatest (you definitely want to be sure first that there are no conflicts with other critical plugins that you’re using on your site).
  • Make sure you update all of the plugins and themes you’re using to their individual latest versions (get rid of every single plugin and theme that you’re not using).
  • If you are hosting on a shared (a.k.a “cheap”) web host paying just a few dollars a month for hosting, then your web site is basically competing for server resources (like memory and bandwidth and database access) with possibly tens (or even hundreds) of other web sites on that same server (many may not belong to you, but to others with whom you are sharing the server – and hence the name “shared hosting”). Search for the keywords “digg effect” or “slashdot effect” on Google, and you’ll see how many WordPress sites crash when a link to the site appears among the top results in popular social sites like Digg.com, Reddit.com or Slashdot.com.If your traffic levels have outgrown your server, then the best thing you can do is to upgrade to a bigger server, or get a Virtual Private Server, or even get a dedicated host, depending on your budget. See our recommended web hosts list.
22

Conflict With “Cache” Related Plugins

DAP Now Works With WP Super Cache

If you’re having weird issues – like members logging in and seeing other people’s profile information, or logging in as a valid user and being told “Sorry, you don’t have access to this content” – then it’s probably because of a “cache” plugin.

Do not use cache plugins on your membership site

DAP now fully works with WP Super Cache (and possibly other cache plugins too).

You just need to make sure that you exclude your member content (including the login page) from being cached.

Cleaning Up After Your Cache Plugin

Follow the steps below to clean up some the junk left behind by cache plugins (regardless of whether you see them in your plugins section, and regardless of whether they are currently active).

1) You wish to disable your cache plugin that is currently enabled

2) You previously had one enabled at some point in the past

3) You don’t believe you ever had a cache plugin enabled in the past

4) You were redirected to this page by the DAP support team because of potential caching-related issues

  1. De-activate the plugin if it is still active
  2. Open your wp-config.php file.
  3. If there are lines in there that look like this…
    define(‘WP_CACHE’, true); //Added by WP-Cache Manager
    define( ‘WPCACHEHOME’, ‘/home/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager
  4. Then comment out both lines, by adding a “//” at the beginning of each line, like this.
  5. //define(‘WP_CACHE’, true); //Added by WP-Cache Manager
    //define( ‘WPCACHEHOME’, ‘/home/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager
  6. Go to your /wp-content/plugins/ folder. See if there’s a folder in there called “cache”. If yes, then rename it to “_cache”.

Now re-test whatever the issue was before, and it would have probably been resolved now.

That should do it.

If the issue still persists, let us know via a support ticket.

4

What “Free Installation” Means

As a courtesy to our customers, we offer a free installation service, where we will install DAP on your site for free. And we can do your free installation within 24 hours of your purchase.

However, many people are confused by what “Free Installation” really means. So this article is to give you more details about that.

Installation vs. Setup

To give you a real-world example, think of “DAP Installation” similar to “Delivering the boxed TV set to your doorstep”. That’s it!

We won’t take it out of the box, hook it up to your cable box, set up your channels, set up your DVR, hook up your game console, DVD player, Roku box, etc. All of those things fall under “Setup & Configuration”.

So if you want our help setting up your DAP site, then check out our “Membership Site In A Box” package that comes with “Concierge” sessions to help you set it all up.

What Free Installation Includes

  • We will upload all DAP files to your server
  • We will activate the dap plugin on one WordPress blog (the DAP-WP-LiveLinks plugin)
  • Activating this plugin will create all of the dap tables in your WordPress database
  • We will setup the Cron job(s) for you within your web hosting cPanel.
  • If we see any hosting related configuration or installation issues, we will do our best to resolve them, if they are even resolvable (99% of the time, they are).
  • We will then send you your new DAP Admin Email id and Password via the same support ticket you opened for installation.

That’s it. There’s nothing else involved in the free installation that we perform.

What Free Installation DOES NOT Include

  • Installation or setup or configuration of your theme (like OptimizePress or Thesis)
  • Installation, setup or configuration of other plugins
  • Troubleshooting of your current WordPress installations
  • Troubleshooting issues with any previous membership plugins that you may be using
  • Doing an “Overview” of your web site and giving you ideas about what can or cannot be done using DAP
  • etc… etc… but you get the idea πŸ™‚

Hope this helps clarify what you’re getting as part of your purchase.

Please remember that get get only one free installation, regardless of which license you buy.Β  Additional installations may be purchased at http://DigitalAccessPass.com/buynow.php#installation

If you want us to do it all for you, then check out our “Membership Site In A Box” package that comes with “Concierge” sessions to help you set it all up.

To get your first free installation, click here.

7

Troubleshooting DAP/WordPress Sync

The problem:Β Β  DAP users are not being “sync”ed to WordPress.

Here’s how to troubleshoot.

What are your sync options in DAP Admin -> Setup -> ConfigΒ  -> WordPress Related Section?

Do you allow all users to be sync’d or just paid users?
Do you allow users to be synced only when they pick a username?

If you allow all users to be sync’d and do not want to force your users to pick a username before dap syncs to WP, then use these settings:

Sync DAP User Data to WordPress “Y”
Sync Paid Users Only “N”
Sync Only if Username Exists in DAP “N”

To test:
1) Add a user manually to DAP via dap admin panel
2) Note down the user’s dap login id/password
3) Open a new browser where you are not logged in to DAP as admin
4) Now login to DAP again but this time as the user you created in step 1.
5) Now visit any part of your blog. DAP will now sync user to WP.
6) Login to WP admin panel. Click on Users in the left sidebar and see if the new user was created.

Troubleshooting Bulk-Add & Bulk-Import Of Users

Issue: You tried to bulk-add users to DAP (i.e., a bulk-import), and it is not working. No users have been added to the system.

Possible Solutions & Troubleshooting Tips

1. CSV File created?

First check if there's a .csv file that has been created in the folder /dap/bulk/ on your server. If there's more than one .csv file in there (from a previous import/bulk-add), then see if there's a file whose timestamp is close to the time when you actually did the "Users > Add > Bulk-add Multiple Users To A Product" action.

If there's no .csv file, then it's possible that the folder doesn't have the right permissions for DAP to be able to create the file. So CHMOD the "bulk" folder (in /dap/ folder) to 755. Then re-try the bulk-add again.

2. Is Cron job running?

You see a .csv file in there sitting for a few hours, but none of the users inside the .csv file have been added to DAP.

It's possible that the hourly cron job has either not been set up at all, or may have been setup incorrectly. Make sure the cron is setup and running correctly.

See both these links:

i) Setting up Cron

ii) All about Cron

3. Error in CSV File

Sometimes, it is possible that the .csv file was actually created, but it was actually corrupt. And you won't know this until the cron runs and that specific bulk-add job shows an error.

When you look at the “System > Job Queue” screen, you see one line that shows this error…

Action: BulkAddCSVToProduct
Message: Error in CSV File

You were probably trying to to Bulk-Add Users to DAP. Or do a Broadcast email to a CSV file. In either case, there was an error in processing your request, because one of the following happened:

1) The CSV file could not be created in /dap/bulk/ folder because of a permission issue (try CHMOD 755), so when the cron task ran, it could not find the CSV file (or the file was corrupted for some reason).

2) The list of email addresses within the CSV file were not in the right format – Order should be: Email,FirstName,LastName ( LastName is optional)

How To Fix It

If a job fails, then there’s no way to “fix it and re-run it” right now. So you basically have to delete the job, and then submit a new one. So if a Bulk-Add job errors with the above message, then here’s what you need to do…

A) Click on the “Delete Jobs In Error” link on the “System > Job Queue” page. That will delete all jobs that have failed for whatever reason.

B) You should also clear out the /dap/bulk/ folder to make sure you delete any old, or errored out CSV files from that folder.

6

Data Loading Errors

Progress Bar Never Stops

You’re seeing the green “Loading… Please Wait” progress bar continuosly running – it never stops and comes back with any data.

If this is a new setup, then it’s possible that your web host does not have a library called “JSON” enabled. Just ask them to enable it for your server. It’s rather simple to do, and we’ve never seen a host that won’t do this for their customers.

If it’s an old setup, and it was working previously, then your host made some changes that caused the library to stop working. So you still need their help in resolving the issue.

Error Message: “There was an error returning data'”.

One possibility is that your database or web site is temporarily down, slow, or plain not responding for some reason. So DAP cannot connect to your database, and comes back with this error.

Or it could also be the “Progress Bar Never Stops” issue from above.

21

Moving DAP From One Host (or Domain) To Another

NOTE: We do not provide support for server or domain moves as part of Standard DAP Support that you get with your purchase of DAP. Please see our Terms Of Support which explains why. If you want our help with moving a DAP installation, you may purchase Premium Support slots from http://DigitalAccessPass.com/buynow.php#store (see “Installations & Support” tab)

Moving a DAP installation

DAP does not store the domain name anywhere in the database. So if you want to move an existing installation to a new domain, the only place where you need to change your domain name in the DAP installation (if you’re moving across domains) is in the dap-config.php file.

Moving a DAP installation consists of basically moving the files, and moving the database. Only 2 components.

  • Log in to your web hosting control panel, go to “phpMyAdmin”, select your WordPress database (which is where the DAP tables are also installed, by default)
  • Do an “Export” of just the DAP tables. Select the “SQL” option and select “Save as File”. All DAP database tables start with the text “dap_”. Save this file on your desktop – let’s say you call it “dapexport.sql” (it could also be “dapexport.txt” – does not matter what the exact extension is – .txt or .sql).
  • Make a back up of the dap-config.php file (located in the “dap” directory on your old site/domain) on your desktop
  • At your new site, install WordPress (if not already installed)
  • Log in to your web hosting control panel of your new site, go to “phpMyAdmin”, select your WordPress database, go to the “SQL” tab, open the export file from above (dapexport.sql), copy the contents, paste into the SQL tab and hit “Go”. All dap data from your old site is now on your new site.
  • Copy the database credentials (db name, db username, dp password and db host) from your new blog’s “wp-config.php” to the “dap-config.php” file stored on your desktop.
  • If you’re also changing domain names, then open dap-config.php, and modify SITE_URL_DAP to point to your new domain name.
  • Upload all dap files to your new site (don’t do full installation – just upload the files).
  • Upload the DAP-WP-LiveLinks folder to wp-content/plugins/
  • Upload the modified dap-config.php file from your desktop to the “dap” folder on your new site.
  • Log in as WP admin, and activate the DAP-WP-LiveLinks plugin. It should give you a warning that DAP is already installed. That’s ok – that’s what we want it to say.
  • That’s it. DAP is now moved over from your old site to your new site.
  • Log into your DAP Dashboard using your old DAP admin login info, and you’re all set.

 

25

WordPress User Sync

NOTE: This content is for advanced users only, who understand the concept of user tables, database, etc. If you don’t understand any of this, then just ignore this – you don’t really need to know this in order to use DAP. This is only an explanation for those who wish to go under the hood of DAP and its integration with WordPress.

As you probably already know, WordPress has its own user database.

DAP has its own User database, and doesn’t use the WordPress database – for many reasons, not limited to the following…

1) Ability to store more user information than what WordPress allows

2) More powerful user search, profile updates, affiliate information, etc.

So, if you want to use any WordPress based plugins – like WordPress Forums or Subscribe2Blog – these forums are looking at WordPress’ native user database.

Now comes the necessity of “syncing” the DAP user data and your WordPress user data.

In the DAP Dashboard, in “Setup > Config > Advanced“, you will see two settings for syncing DAP & WP user data.

(1) Sync DAP User data and WP User data

If you turn this to “Y” (for “Yes”), then every time someone logs into DAP, their DAP user data (just name and email) is automatically “synced” with WordPress user data. If you set this to “N”, then no data will be transferred from DAP to WordPress.

(2) Sync WP data only for PAID users

This one matters only if you have set (1) above to “Y”.

If you want only your “PAID” members to be synced with WordPress, then set this to “Y“.

If you want both “FREE” and “PAID” members synced with WordPress, then set this to “N“.

Here’s how it actually works:

  1. For the sync to work, you must first setup and save the above 2 config settings
  2. After you save the above two config settings, make sure you log out of DAP and re-log in (if you are/were logged in and testing as a regular user), because only then, the Config settings above will take effect.
  3. Your user must log in through a DAP login form (not the WP login form).
  4. Make sure the user is redirected to any part of your WordPress blog after log in. This can be done via “Logged In URL” setting in DAP Config.
  5. The user can be redirected to any WP page, WP post or even your blog home page – that’s the only time the ‘syncing’ kicks in.
  6. When user lands on any page/post of your WP blog, then the DAP LiveLinks plugin (which you have already installed & enabled) kicks of the “sync”, copies the logged in member’s name and email over to the WordPress user table, and also automatically logs him into your WordPress blog.

That’s all there is to it.

Also see: Forum Integration

4

Removing User Access To A Product And Deleting Users

Expired Users

Users whose access has expired – i.e., today’s date is greater than the access end date for a specific product – automatically lose access to all of the content within the product. You don’t really have to do anything to prevent them from not accessing the content.

NOTE: If you actually *want* your members to have access to previously paid for content (content that they were paying for before their account expired), then you can do that by setting the config field “Setup > Config > Advanced > Allow access to previously-paid-for content even after subscriber cancels?” to “Y”. If this is set to “N” (which is the default setting), then as soon as a member’s account expires, they automatically lose access to all content in the product.

Manually Removing Complete Access to a Product

1. First search for user in the “Users > Manage” screen.

2. At the end of the user’s row of information, you’ll see a link called “Remove”. If you click on this link, the user will completely lose access to the Product – like they never ever had access to it. You will lose all history on that specific product access (when did they first sign up for that product, when they expired, etc). So use caution when completely removing access in this manner. Of course, nothing happens to the user data itself. And their actual order information (“Orders” page) also remains intact, and you can view it on the “Orders” page by searching using a transaction number or email id. It’s only the user’s access to the specific product that is removed.

Rolling Back Access to a Product

If you just want to roll-back access by a month, instead of completely removing access, then you can do this from the “Users > Manage” screen, by searching for the User first, then checking the check box next to their record, and then selecting the “Rollback Access for Selected User(s) to the Product by 1 Recurring Cycle” and picking a product name from the drop-down.

Deleting users

If you wish to completely remove the users from your database, then check the check-box next to the user’s row, and then in the upper right hand section, click on the “Go” button next to the text “Fully Delete Selected Users from the database”. That should do it.

2

Upgrading to DAP version 1.0

The following is relevant to you only if you are “Upgrading” DAP from an earlier version.

Yay, DAP version 1.0 is here! (click here to see the what changed )

This is an important update, so do not skip this.

Here’s how to upgrade to the new version:

1. Download the zip file and unzip to desktop. You should now see a folder by name “dap” on your desktop.

2. Overwrite the contents of your current “dap” folder on your site with the contents of the new “dap” folder on your desktop.

3. Do not try to use any admin functionality yet. Visit the following link:
http://YourSite.com/dap/update.php and follow the instructions on your screen.

NOTE: Replace YourSite.com with your actual domain name.

That’s it!

<sidebar>

This is just for your information….

We have moved the email and header/footer templates from text files into the database, as some web hosts were very weird with file permissions and were causing issues. So all files which were previously located under /dap/templates/email/ and /dap/templates/content/ have now been moved to the database.

The contents of these template files have been copied over as-is to your database. But just as a sanity check, visit your “Admin > Templates” screen and double-check the content of these templates.

</sidebar>