Dummies Guide to setting up staging/test site in Wordpress

apps

#1

I’ve tried the Wordpress forum and Google searching to no avail, so I’m coming here as my last, best hope.

I’m using Wordpress (one-click, Advanced mode) on my site, www.touchwoodproject.com. I need to redesign it using a new theme but I need to change a bunch of posts, add some plugins, etc, so I can’t use plugins like Theme Test Drive because that just changes the look of the site but nothing else. I don’t want to take down my existing site while I make all these changes, so. How can I do this?

All the info I’ve seen (including using a plugin called Dev and Staging Environment) has you doing things like modifying the config file, but they don’t exactly specify how and I have no idea how I’d “ensure it has read and write privileges in the Wordpress root”. What?? I almost never use FTP and have no clue how PHP works or even what it really is.

Can anyone tell me a Dummies Guide to setting up a staging site so I can rework my site? Ever hopeful…


#2

It sounds like you want to run parallel installations, based on your live version.

I would go with the following:
Restore your Domain (from the DH panel for Manage Domains) with a timestamped appended directory. Create a Fully Hosted SubDomain owned by the same user (again, from Manage Domains) and tell it to use the newly restored directory for the web directory (normally, it’ll prefill “/home/USER/SUB.DOMAIN.com,” so tell it “/home/USER/DOMAIN.com_TIMESTAMP”.

Restore your Database (from the DH panel for MySQL) with timestamped prepended tables. Edit your WP config.php to use the new table prefix.


#3

Hi Scott! Hoping you are still out there. I followed your instructions exactly and have my test instance up and running perfectly with one exception. When I login to the WP admin using my subdomain, when I click login it redirects me to my main domain’s admin dashboard for WP.

What am I missing?


#4

I didn’t think wp-admin could be tricked into bumping you to the main domain. Two ideas:

  1. When you go to wp-admin, it redirects you to wp-login, but look at the URL in your menu bar. There’a redirect flag tacked onto the end. Manually edit that to reflect your subdomain. It has some % characters, but I hope you can decipher it enough to fix the redirect URL.
  2. Use phyMyAdmin to connect to the database server. Browse the desired database and find the “blahblahOptions” table. Browse that table and the first entry is usually the Site URL. Edit that so it’s your subdomain.

#5

I’ve done all of this, and now, I get the error:

ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

when I try to load my subdomain’s wp-admin.php.

However, cookies are NOT blocked, and ARE supported by my browser.

I even tried moving my plugins directory for the subdomain to old-plugins, in case it was a plugin issue.

No luck. I can’t log into wp-admin for my subdomain.


#6

try clearing your browser cache/cookies…or try a different browser maybe.


#7

Did both. No luck. I did discover that there were some tables (options, usermeta) that needed some meta key names changed (there were several that used the live database table prefix, rather than the backup copy), and a few that needed their values changed to the subdomain rather than the live site’s domain.

Now I’ve gotten past the whole cookies problem, and am faced with WP claiming that my administrator account doesn’t have permission to access the admin panel when I try to login:

“You do not have sufficient permissions to access this page.”

EDIT: And, I fixed it. Turns out that editing database fields when sleepy creates problems, like not putting the extra trailing “_” in the new table names into the appropriate fields. Once I did that, I got in.


#8

[quote=“sdayman, post:2, topic:53329”]
Create a Fully Hosted SubDomain owned by the same user (again, from Manage Domains) and tell it to use the newly restored directory for the web directory [/quote]

The control panel didn’t let me use the same user for my subdomain. I am using DreamPress…is that the reason why?


#9

Dreampress has staging built in. It should already be available to you.

As I don’t use dreampress (yet), you should contact support.


#10

Can someone type out these “Dummy Directions” in a manner better suited to dummies?

I tried restoring my main website with the timestamp thing, but I got an error that it took too long.

I currently have my main website and a subdomain. The subdomain is fully hosted, but has nothing on it. I want to copy my main site over to the test subdomain so I can test out plugins outside of my live environment.


#11

Anyone?


#12

I would like to know as well.