Building a Wordpress site on Openshift to scale - wordpress

Openshift's default app generator sets Wordpress creation of sites to be a non-scalable version of their gears. I'd like to know if there is a way to set a scalable instance and install wordpress on it.
thanks!

I am working on this today actually and got a scalable wordpress site up and running on OpenShift. (www.runcloudrun.com)
I disabled the symlinks in the action_hooks and manually added my theme and plugins to the php/wp-content/themes and plugins directory. I also used a S3 plugin to store all of my media files on amazon s3 so my images and media would scale once OpenShift adds addiontal gears.
I am writing a blog post on how to do all of this and it should be posted later this week.
Edit to add the blog post: http://www.runcloudrun.com/?p=22
--
gs

You can checkout this AppFog solution. And if you visit his Github you'd find an OpenShift wrapper as well. These two might give you all the sparks it needs to think out a scalable solution on Openshift.

Just use the git source URL and create a new app with PHP. Once the app is created, add MySQL to it.
Once you've created the app, the important next step is to check in your modules directly to the Git repo.
By default, we wanted folks to be able to download plugins directly from Wordpress, but when you scale, those files aren't copied over. Also, the filesystem for each gear in a scaled app isn't shared, so modules uploaded after you scale aren't magically copied to all gears. Given that limitation, we decided to mark the QuickStart not scalable, so as to prevent unfamiliar users from getting into trouble.
If you're familiar with Wordpress just check those modules in directly to your source, and everything will scale.

Related

Wordpress - migrating posts and images only

I am changing my Wordpress theme. I've set it up on a development server. I now want to import the posts, pages and media to populate the database.
I have been using the built-in Wordpress import/export function which is erratic when it comes to media. Sometimes all the imports fail, sometimes some of them fail. It's problematic and I am giving up on that.
Is there a reliable plugin that I can use? I've been searching without success.
The best way to create a dev environment for wordpress is to create a mirror copy of it and then changing its url.
You would need to copy over all the files and restore the database on the dev environment and then hard coding your dev url in wp-config.php. At that point, you can upload the new theme and activate it.
I've tried all types of plugins as well as WP built-in export/import functions. The solution that worked well for me was All-in-One Migration plus All-in-One Migration Extension so allow the transfer of 16GB of data. I've had one or two hiccups along the way but the technical support folks at ServMask are very responsive and solved the issues expeditiously.

Is it possible to host my WordPress plugin in GitHub?

I know that the WordPress plugin directory is hosting site and not a listing site.
In order for your plugin to appear in the directory is to host your plugin with them using SVN.
I have used their SVN for a while and just wonder if I can instead use a GitHub repository and whenever I release a new version on GitHub it will automatically release an update on the WordPress sites which the plugin is installed.
I really think that if I used GitHub in hosting my plugin, it will not appear in the WordPress plugin directory? Am I right or wrong about it?
I want to use GitHub to release and at the same time, I want my plugin in the WordPress plugin directory.
I have tried so far following this tutorial: https://www.smashingmagazine.com/2015/08/deploy-wordpress-plugins-with-github-using-transients/
But this is for self-hosted plugins.
Unfortunately there's not a straight way to get what you're looking for. At the root of it, you need to have your Plugin hosted and maintained on their SVN.
That said, there are some Git to SVN Mirroring options available that, while a bit convoluted to set up (and sometimes providing mixed results) should be able to handle what you need if you can bear to walk through the initial set-up.
Check out the following gist: https://gist.github.com/kasparsd/3749872.
If you set it up properly, you'll be able to effectively deal with your plugin like it's hosted on GitHub where it will mirror itself into WordPress's SVN, so it will show up in the Plugin Repository.
Unfortunately I haven't seen it even broached as an issue since what, 2015? So the odds of native GitHub repo integegration at this point don't seem all that high.

How to manually back up wordpress website

I have never used wordpress before, My boss has given me access to a site which was created using wordpress. then He asked me how I am going to make sure I don't break the site accidentally, I told him I would create a backup on my local computer so that all my changes can be restored if I mess up.
I have the wordpress dashboard up. How do I back up EVERYTHING, I hear there are two separate things I need to back up? someone please help me.
PS: I don't think he would like me to do this with out the use of additional plugins.
There are two separate things:
Your website database. Simply export all the MySQL tables from the database, which is dedicated to your site.
The site files, everything you've got under WordPress folder, /wp-includes, /wp-content, /wp-admin directories and all files.
This should do it all. You can test on your localhost to make sure it's everything that's necessary.
You can backup your WordPress either from your hosting account (preferable) or from your WP dashboard.
You need to backup two things - all the files (the root of your Wordpress installation) and the database for your WP installation.
Since you only have access to the dashboard, you have to use plugin for this.
Two of my favorite free backup plugins are:
BackupWordpress - https://wordpress.org/plugins/backupwordpress/
BackWPup - https://wordpress.org/plugins/backwpup/
They are intuitive and easy to work with, so you shouldn't have issues.
If you go to the dashboard go to "tools" in the left toolbar. Select "export". On the export page you can report that you want to export "all content". This will get you the items that you need from the server.
Then you need to install wordpress to your machine. You can download that from: https://wordpress.org/download/
Once you have that on your machine you also need a local server to run it and test it. I like WAMP, but it partially depends on your operating system. I suggest the following video to get you up to speed on how to get the localhost set up and running: https://www.youtube.com/watch?v=snFzbPm_RUE
Hope this helps!

Same wordpress plugin, multiple local websites

Thanks for taking the time to read this.
I have a WordPress plugin hosted on GitHub - lets call this plugin 'LK-FORM', and it's running on 3 different live websites. 'LK-FORM' is exactly the same for each website.
These 3 different websites are also running locally using Ampps.
My question is; How do I get 'LK-FORM' to be in 3 local websites but still update the master branch on GitHub when one of them is changed so that all 3 live sites stay up to date.
I've cloned 'LK-FORM' into one local plugin folder, but when I go to clone again, the repo isn't there anymore since it's already listed on the GitHub GUI. Any help would be greatly appreciated.
Sounds like a use case for git submodules, although a Google search will turn up many articles against their use. Submodules have a lot of gotchas, but you can make good use of aliases or tools like gitslave.
Edit: You could also just clone to one directory and symlink the others, adding them to .gitignore to prevent redundancy.

Wordpress second install in subdomain?

I am having a website redesigned. The designers plan to use Wordpress as the CMS and want a development copy to work with. Thing is, I now have Wordpress installed to run a blog (only) on a subdirectory of my current site.
Soooo...question is: Can I create a subdomain, install Wordpress on there, point it at a separate (new) schema on MySQL and have them use that for the development work? I know I can physically do this, but will anything about running the the WP install scripts on the subdomain screw up the existing production install on the main domain?
The install itself should not create any problems. Personally, I always develop WP sites in their own subdomain, allowing me to do away with the wordpress/ subdirectory.
The most significant hurdle will come when you are ready to move the development site to a new domain and/or place in the directory hierarchy. Although the theme files and their associated CSS, JS, etc., files should be using relative-path references, the database itself may contain hundreds of fully qualified URLs that reference the development domain and/or directory.
There are a number of WordPress plugins that address this problems. The one I am most familiar with is BackupBuddy from ithemes.com. (I'm not a shill, just a satisfied customer.) BB is useful both for performing scheduled backups (full or database-only), but it is also very useful during development and during deployment. There is an included script, importbuddy.php, than can not only take a .zip of a full backup and restore the site, it can also move the site from one directory and/or domain to another.
Note: BackupBuddy is not free, but it is released under GPLv2. You are paying for the support necessary to keep it tracking changes in the WP ecosystem. If you are doing any serious WP work then it is money well-spent. You might suggest this to your designers.
Yes you can do it. It doesn't matter. You can install your new blogs to any directory or subdomain (actually they're directories, too). Also you can use new MySQL databases for them, or you can use same database for your all WP installations (by editing wp-config.php manually), thereby you'll have same content for your all WP blogs.
Technically, yes you can do it.
However, if you have a live domain with public people using it, you are best not developing on either the same domain or server, because:
Mistakes happen. You can break the database or other code.
While you develop, you can affect performance of the server.
Develop on a local machine, or a completely different server, and when you are happy with it, push the code live onto the production server.
if you are planning to make a test copy of the current install on a subdomain which includes separate source code and database the answer is NO it will not affect your current installation.

Resources