markjaquith / wordpress-skeleton Goto Github PK
View Code? Open in Web Editor NEWBasic layout of a WordPress Git repository. I use this as a base when creating a new repo.
Basic layout of a WordPress Git repository. I use this as a base when creating a new repo.
Hi,
This is my situation:
If I click Websites > Second Website > Dashboard it says there is a redirect loop. Is it possible to use multisite with skeleton? Would be awesome if you could explain how :)
After your talk at #wcsf I decided to give WordPress Skeleton a try. I have a local version of a LEMP stack running. I realized that I needed to get the WP files (since they weren't there) so I cloned them from the latest.tar.gz file. I then went to set up local-config.php to my local server's mysql credentals.
When I go to setup the install, it cannot find /wp-admin/install.php because it's located in /wp/wp-admin/install.php. If I go to the ladder and set up WordPress, it works, but now the site is accesable at localhost/parkers and localhost/parkers/wp and I can only log in at the /wp/wp-admin url.
I feel like I am missing something big, but I cannot see it from the instructions set in the README. I'd appreciate any help.
Zach
This absolute path is used by the WP iOS app.
WP Skeleton puts this in /wp/xmlrpc.php?rsd
Do you know if there's a workaround for this? Wondering if a symlink might be the way to go.
Q: What version of WordPress does this track?
A: The latest stable release. Send a pull request if I fall behind.
The current version is neither the latest nor stable.
This could potentially be a bug with how I had nginx setup.
Using the skeleton recently on a dual server setup, behind a load balancer, very randomly, we'd get the site url being set as the servers internal IP address. Only on say 1 or 2 items in the loop. 95% of the site was perfect.
@jdub worked out that it was the following
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );
being set wrong.
Again, it feels like a nginx issue, and it not passing the correct host through... To solve quickly, I updated my WP_CONTENT_URL constant to
define( 'WP_CONTENT_URL', WP_HOME . '/wp-content' );
Just posting in case others have hit this problem before or in the future.
You are saying that wp-config.php cannot be inside /wp/. Why can't be?
Thanks in advance.
K.
I am starting to question if not using ENVVARS would be a better way to manage Environment specific variables within the Skeleton. I am just looking for a friendly discussion on this. Pros and Cons.
Would be good to include the rewrite.script for Zeus Web Server.
Namesco support page have some notes:
http://www.names.co.uk/support/hosting/support_centre/linux_hosting/1119-wordpress_rewrite_script.html
Is there any way around having to manually enter your FTP info to install plugins or update WP from the admin?
I can't seem to fix that WP feature with permissions.
I'm not sure if this had been considered, but it seems that .git may have a lot of information in it, that many may not wish to be publicly accessible.
I did a quick addition of a RewriteRule to redirect any request to .git to the root, but I could see arguments for having such requests be outright Forbidden, Gone, or rewritten to /index.php...
Opening this issue here only because Issues isn't enabled on the WordPress repo, but:
Is there a reason the main WordPress repo doesn't have a "latest-stable" branch? It seems silly that you should need to manually update the submodule with each new release.
Hi
Thanks for this repo, very much looking forward to using it.
While setting it up to work on a local computer, I was pleased to see the local-config.php facility and jumped in to use it. However I believe it might be better if you also allowed the following to define local paths (in local-config.php)...
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );
My local paths are usually http://localhost/_mysite_ so the above line would have to include '/mysite/content'
to work.
Then in the standard wp-config.php file use...
if (!defined('WP_CONTENT_URL')) define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );
to test if we are on the local site or not.
In this way paths for local setups are kept in one place and we wont have to edit the main config file when its uploaded to the live site.
Any chance you can update the repo with the wp-config.php change?
When updating the submodule an error pops up:
git submodule update --init
Hello and thanks for the great project. I'm using wp-skeleton to save on memory with opcache, and it's working quite nicely.
A marketer I work with noticed that, around the time we changed to using wp-skeleton, organic keywords dropped and Google Analytics now reports canonicalization/duplicate content issues.
Sure enough, when we tested, all the sites setup with wp-skeleton were not exhibiting the normal WP behavior of redirecting visitors to the FQDN in Settings > General > Site Address (URL). For example, even if the value was http://domain.com, WP would now would permit www.domain.com and domain.com without performing redirection.
The sites not using wp-skeleton (there are a few plugins like NGG that break with wp-skeleton, their fault and not wp-skeleton's), were behaving as expected by redirecting to the Site Address value.
The issue is corrected when we comment out the lines in wp-skeleton's custom wp-config.php that set the WP_HOME constant. Specifically, these lines:
if ( ! defined( 'WP_HOME' ) ) {
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
}
Once this is done, it works as expected. So it appears that by setting WP_HOME, it doesn't just disable changing of the Site Address value in settings, but it also disables the normal redirection behavior.
I've tested with these lines commented out and every other part of the site still works, whether we use www. in the setting or not, it redirects as it should and no page objects fail to load.
I wanted to report this but also ask if this is known/expected behavior, as well as if anyone see any issue with leaving out this stanza.
Thank you!
Hi,
when creating a multisite network with a project of mine, based on WP Skeleton, WP alerts me that subfolders based network are not completely supported, or something like that. Anyway, I did this and it's apparently working fine. The unique problem I had until now was that network-admin was not redirecting correctly. But I could fix it with this mu-plugin.
/** * Plugin Name: Pitou: Network Fix * Description: Try to provide a better experience when working with WP Network. */ final class Pitou_Network_Fix { function __construct() { add_filter('network_admin_url', array(&$this, 'get_network_admin_url'), 10, 2); } function get_network_admin_url($url, $path) { return str_replace('wp-admin/network/', 'neferpitou/wp-admin/network/', $url); } } new Pitou_Network_Fix();
Please, notice that the code neferpitou/wp-admin/network/
is equivalent to wp/wp-admin/network/
.
So, what would be the expected issues I could have in the future? I'd like to know what kind of risks existis if I deploy this project in production.
Thanks,
Thiago
Wordpress 3.8 is now available. Submodule should reflect this 👍
This is more of a question than a bug. With this repo setup, after deploying the site to a production server, what would be the ideal method of updating WordPress core and also the native themes that come with WordPress (e.g. - TwentyEleven)?
For the native themes, the WordPress updater appears to have issues updating due to the symlinks in the content/themes/
directory. For WordPress core would you update via the WordPress updater or by manually pointing the git submodule to a new commit SHA for the tagged release (i.e. - keeping the submodule up to date)?
Thanks for the help!
It would be very helpful if the README could explain the /shared/ idea in greater detail. Currently this is a bit murky (for me anyway).
Much appreciated.
Can't seem to work this one out. Here are the steps to reproduce:
That'll get me a redirect loop every time. Interestingly, I tried following the WordPress directory instructions, and that also resulted in a redirect loop.
Not sure if this is the correct place to post this issue, so let me know if it's a better fit for the WordPress bug tracker.
Hi,
I am having trouble configuring "pretty URLs" with WordPress skeleton. Any advice would be much appreciated.
This is the link I am trying to access:
http://projects/WordPress-Skeleton/wp/hello-world/
I am a bit confused, shouldn't it really be without the "wp" part?
http://projects/WordPress-Skeleton/hello-world/
Database:
.htaccess:
wp-config.php / local-config:
Hi I have wordpress-skeleton in a subfolder of a site eg http://site.com/site/
wp setup ran ok and site is visible in the above url BUT no styles are loaded for either the theme or plugins (same for js).
When I look at the css url it is missing the' /site/' subfolder eg
http://site.com/content/themes/mytheme/dist/styles/main.css
I have the following in wp-config.php
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/site/wp');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . '/site/');
How come the theme (& plugins) asset paths are not correctly set?
Hi,
Please accept my apologies in advance if this has been covered in previous questions. I have attempted other fixes listed here but am still having issues getting WP Multisite to work.
I have an existing site set up with this WordPress skeleton in XAMPP. I would like to change this existing site to use multisite. I am getting conflicting messages about whether to use the sub-directory or sub-domain option, what additional code to include in my .htaccess file to make multisite work with WP Skeleton, and whether or not to have the trailing /wp in the site address setting.
I have attempted changing the existing site, and also creating a blank site with WP Skeleton. Both times, once I have made the config changes to wp-config.php and .htaccess, logged out, cleared my cookies and browser cache, and logged back in, I do not see any change in my WP dashboard that indicates I am now running a Multisite site.
Tell me if I'm asking too much, but is it possible to have a guide to set up multisite with the skeleton?
Thanks in advance :)
I'm using the WordPress Skeleton with WordPress 3.7.1. I also used the fix from this comment for my .htaccess
so as to not have to type in /wp
to access everything. Whenever I try to upload any media, however, I get this error:
Unable to create directory uploads/2013/11. Is its parent directory writable by the server?
I'm working in Mac OS X Mavericks. Anyone know what might be wrong, here?
Greetings,
I tried to do a "git pull origin master" from the wp submodule folder and got a log of merge conflicts. As we haven't updated any of the files locally, the source of these conflicts is unclear. Anyone else see this?
Automatic Background Updates
For WordPress 3.7+, you don’t have to lift a finger to apply minor and security updates. Most sites are now able to automatically apply these updates in the background. If your site is capable of one-click updates without entering FTP credentials, then your site should be able to update from 3.7 to 3.7.1, 3.7.2, etc. (You’ll still need to click “Update Now” for major feature releases.)
Based on my research, the auto updates won't happen if it's a git project.
With that said, it seems like this might open the doors up to WP developers updating WP more often (especially for small fixes).
Do you have any thoughts/plans on how to handle this? Or, how do you suggest folks handle this? Would it just be a matter of updating the submodule more often (assuming that there will be more frequent updates)?
Do you have plans to change your setup based on the advent of automatic updates?
Just curious what your thoughts are more than anything.
Thanks!
I'm getting the wrong path for all assets in my themes (any theme I place into /content/themes
)
For example, in the source code, a stylesheet link points to:
http://localhost/content/themes/roots/assets/css/main.min.css
when it should be:
http://localhost/lab/Wordpress-Skeleton/content/themes/roots/assets/css/main.min.css
The global $wp_theme_directories returns an array with two paths, and both are correct:
.../htdocs/lab/WordPress-Skeleton/wp/wp-content/themes .../htdocs/lab/WordPress-Skeleton/content/themes
but, the function get_theme_root_uri()
when called from the functions.php
of a theme located on the second path from the $wp_theme_directories
array, returns:
http://localhost/content/themes
The themes from the folder /wp/wp-content/themes
(the default ones that came with the WP submodule update) work fine.
I can't work in admin area...
http://test-domanin/wp/wp-login.php load css from root and when a try to login wordpress redirect to http://test-domanin/wp-login.php (not in subdirectory)
is there a workaround?
Not an issue actually, just a note about Multisite + WordPress in own directory. I think it should be clearly stated in FAQ section of README. Knowing it before would save me some 2 hours :)
WordPress Multisite works well when WP is installed in it's own directory. However, there's one limitation. As stated on Codex:
You cannot choose Sub-domain Install (for a domain-based network) in the following cases:
So, in practice WP Skeleton (or any other way of using WP in it's own directory) is only compatible with a sub-directory setup of WP Multisite.
Certain plugins load PHP scripts directly, not through WordPress, which means that the constants are not available, yet the file then tries to load WordPress core files.
For example s2member loads a file s2member-o.php
This file tries to load wp-load.php and searches down the tree for wp-settings.php
public static function wp_dir ($starting_dir = FALSE, $alt_starting_dir = FALSE)
{
foreach(array($starting_dir, $alt_starting_dir) as $directory)
if($directory && is_string($directory) && is_dir($directory))
for($i = 0, $dir = $directory; $i <= 20; $i++, $dir = dirname($dir))
if(file_exists($dir."/wp-settings.php"))
return ($wp_dir = $dir);
header ("HTTP/1.0 500 Error");
header ("Content-Type: text/plain; charset=UTF-8");
while (@ob_end_clean ()); // Clean any existing output buffers.
exit ("ERROR: s2Member® unable to locate WordPress® directory.");
}
Same with the plugin image-pro, it tries to load wp-load and assumes it's path.
I don't think there is way other than patching these plugins but here's a thought:
What if we in WordPress-Skeleton create a file in the root called "wp-skeleton-define.php" this file would look something like this:
<?php
define ('WP_SKELETON', true);
Plugins and themes could check for that file, include it when it exists and then if it's set to true wp can be found in SERVER['DOCUMENT_ROOT'].'/wp' or if it's a string that would be the path.
This can only be done if we get a group supporting this, including the WordPress core developers.
I want to use this. So I'm checking the code. One thing I can't understand is the following.
From the bulleted list in /README.md
:
Custom content directory in /content/
(cleaner, and also because it can't be in /wp/
)
Lines 78 - 82 in /wp-config.php
:
// ===================
// Bootstrap WordPress
// ===================
if ( !defined( 'ABSPATH' ) )
define( 'ABSPATH', dirname( __FILE__ ) . '/wp/' );
Line 3 in /content/mu-plugins/register-theme-directory.php
:
register_theme_directory( ABSPATH . 'wp-content/themes/' );
Which would give a theme directory path ending in : /wp/wp-content/themes/
.
How does the submodule load the root directory's wp-config? I can't seem to get this part working
:) title says it all
Is there any way to make it work with multisite and subdomains?
hi, im done with my localserver so im ready to push it live so i push it to my repo then clone it to my live server ssh using --recursive after that i access my domain subdir where i clone my repo and its said "Page Not Found" all files are there except local-config.php, do you think i did something wrong?
but one thing i notice is when i clone it to my live server it said "Initialized empty Git repository"
I sort of want to be able to put this whole repository publicly, to show how one can use submodules to manage most of plugins out there.
Your lovely Capistrano stack will allow me to specify the passwords there and overwrite them on deploy. Could we do the same for the salts also?
Thanks a lot!
I think that this (or something like this) need to be added to README.md:
Q: Can I use WordPress in another language?
A: No, from the box (wp directory). You can define WPLANG in 'wp-config.php' and then copy entire wp-content/languages directory in new content directory and then its works.
Since the Akismet plugin is bundled inside WordPress core, should there not be a symbolic link pointing to
./../wp/wp-content/plugins/akismet/
Same could be said for Hello Dolly, but since it doesn't add any real functional value I can see leaving it off.
There should be a setup script that walks people through the initial configuration of wp-config.php and local-config.php
In Windows 8.1 (most likely below too) the linked uploads folder does not work, resulting in permission errors when uploading media or plugins. This can be overcome quite easily with the Link Shell Extension (downloads below).
The extension relies on Visual Studio 2005 Redistributable package which can be found with a quick Google search.
hi, i create a repository and for it and clone to my local folder. create database . create local-confi.php and change to name of database, root,root, localhost. change the path to
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-skeleton-test1/content' );
but now when i go to localhost/wp-skeleton-test1/wp/wp-admin i a have just blank page.
using MAMP and apache port 80 and mysql port 3306
i tried everything with the path but not working. please help
I'm attempting to set up WordPress skeleton in a multisite configuration. WordPress skeleton already places WordPress in a subdirectory (wp by default). I've taken the following steps:
Once all of this is configured, I can see that the main site (example.com and example.com/wp/wp-admin) both work.
I then add a new site to the network. Upon navigating to the site url (example.com/test-network-site) the front-end is broken (style.css, for example, cannot be found at the URL http://example.com/wp/test-network-site/wp-content/themes/twentythirteen/style.css?ver=2013-07-18). When navigating to the wp-admin, I'm in a redirect loop.
My end goal is to be able to use WordPress Skeleton as a base for the sites I deploy and have the multisite configuration work as it does normally (where example.com is the network main site, example.com/test-network-site is a site within the network, and example.com/test-network-site/wp-admin works as it should). At this point my main question may be is this even possible?
Unsure of how to move forward. Any insight would be greatly appreciated!
just a quick question but when i install this on my local system and go to the route it does not start the wordpress installation but display the dreaded error establishing db connection.
Therefore do i need to create the database and all the tables for a site manually or is there an automatic way of doing this using this skeleton setup?
Setting up wordpress in http://mydomain.com/blog
Using function get_template_directory_uri() or it's aliases returns the path
http://mydomain.com/content/themes/theme-name/
rather than
http://mydomain.com/blog/content/themes/theme-name/
Question
What is the easiest way to update the WordPress Git submodule directory on a server after deploy?
Background
I have forked this repo and used it to develop a WordPress Multisite instance.
I just set up Capistrano V3+ to deploy my WordPress Skeleton based site to my server, as recommended by Mark Jaquith.
The problem is that my WordPress submodule is not included as part of the standard Capistrano V3+ deploy. There are many different StackOverflow answers as to how to fix this in Capistrano, all of them fairly hacky...
However, it strikes me that it would be just as easy to manually update the WordPress submodule on my server, until Capistrano V3+ is updated to enable deployment of Git submodules...
Or is there an easier, more straightforward way to update the WordPress submodule on a server after deploy?
Backend image like "Featured Image" or "Theme Screenshot" are not showing.
After I changed domain from test one to proper one I have issue with customizator. I can;t set up logo or background. When I choose image from computer, nothing is done. Logo is not loaded. No action is done. I checked all what I could and can;t find solution. On my computer it is working fine. I don;t know if this can be the specyfic server problem or something else? What shoudl I check?
Great setup, but I am struggling with a real simple issue when I deploy on beanstalk, the require in index.php fails. Any idea? Posted in on SO:
http://stackoverflow.com/questions/29001142/wordpress-on-aws-beanstalk-require-path-failure
Change URL Wordpress submodule
url = GIT://github.com/WordPress/WordPress.git
to
url = HTTPS://github.com/WordPress/WordPress.git
Sorry, I'm probably missing something obvious here, but what is the meaning of the %%
in the config strings? Is this syntax just meant to be replaced by real values? Sorry, it's just not clear to me.
Thank you for the awesome repo! This is one the best WP setups I've seen in terms of version control pattern/template.
Thank you.
As long as I keep the site address as mydomain.com/wp, it appears. But once I change it to simply mydomain.com (and keep the WordPress Address as mydomain.com/wp), the Admin bar doesn't appear anymore on the front-end.
Themes that have a built-in gutter for when the admin bar should be displaying continue to show the gutter, just no admin bar. (See attached). I've tested this behavior in a copy of the Twenty Thirteen theme as well.
Anyone else getting this, or have any idea what might be going on?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.