RossMitchell
Forum Replies Created
-
So you mean I should set up virtual hosts and then the separate websites will each be in a different database, correct? (Which will make it easier to migrate to live?)
YES.
Details on configuring virtual host here:
https://httpd.apache.org/docs/current/vhosts/
And putting the domain name into your “hosts” file, details here:
https://en.wikipedia.org/wiki/Hosts_%28file%29is it easier for me to just uninstall the current WordPress multisite install and start over?
No real need, I would not bother, just keep the multisite around till you need it.
Truly when you get experience with the virtualhost technique, you will be able to do things like download a client site (files and database), experiment upon it, fix it, then either do the same fix on the live site or upload it. Switch between local and live by commenting out the name in the hosts file.
Forum: Developing with WordPress
In reply to: Search button not appearing on mobile websiteThis is about how your theme handles narrow screens, narrower than 768 pixels and those menu icons disapear, possibly done using css media queries, possibly using Javascript.
I used firefox on my laptop, activated “responsive design mode” (Ctrl+Shift+M) and the browser inspector (Ctrl+Shift+C).Suggest that you seek support from the support forum of your theme.
Well if the php is the same, then both would be WordPress sites.
Truly with fast enough hosting, then the ease of use of WordPress makes it a non contest, just my opinion.
Faster to write or faster to load ?
Forum: Developing with WordPress
In reply to: How to show html after header from plugin?Well if you want to see the html I would use my web browser’s browser inspector.
If you want to change the html in some way you should look for a filter of hook function. You will need to read your theme’s template and component files to see the names of which ones it uses.
The filter or hook functions could be incorporated into a plugin, but are more often put into yout theme’s “functions.php” file (preferably of a child theme).
Forum: Developing with WordPress
In reply to: PHP for Search in Primary Top MenuSeveral ways you could do this:
– Create a child theme and modify the PHP code that handles the top menu, probably a file like “header.php”, this will depend upon your theme.
– Inject your piece of HTML that does the search into the menu output by using a filter on the menu code generation, again theme dependent.Either way you will need to read and experiment with your theme files, using a child theme is very highly recommended.
Forum: Localhost Installs
In reply to: can you have different website1 and website2?Another option is to configure your localhost to use your final domain name using these instructions:
http://httpd.apache.org/docs/current/vhosts/
And putting the domain name into your “hosts” file, details here:
https://en.wikipedia.org/wiki/Hosts_%28file%29You can do this with lots of different domains all at the same time, to switch off any of the local website one just comments out the relevant lines in the hosts file.
The latter:
only if I need to make explicit calls to the database?
Specifically, only if you are using the variable “$wpdb”, this applies to all global variables and objects etc, it is not specific to $wpdb”.
Forum: Localhost Installs
In reply to: Can’t Access existing localhost siteA very simple and easy test of a WordPress site is to try and load the “readme.html” file. Being able to view it validates that the webserver configuration has the correct directory mapped and that the files are readable. Without having this correct it is a hopeless task with many more questions than answers. Once you have established that the correct directory is being accessed by the webserver, then it is a good time to start asking questions about PHP servers and databases etc.
Suggest that you look at the “scratch” programming environment. It is a GUI drag and drop IDE (Integrated Development Environment), you will be able browse and adapt examples.
Forum: Fixing WordPress
In reply to: index.php code showing instead of home page executeIf your webserver is displaying the contents of your “index.php” file rather than executing it as code and displaying the results, then this is a problem in the configuration of your webserver, it needs to recognise that a .php file gets handed to a specified language module etc.
Suggest that you seek support of your hosting provider, this is strictly not a WordPress problem.
You mention that you know little about WP and HTML, but how are you with PHP and or Javascript ? You will need some skills in each of these.
I would write a plugin that registered several shortcodes. The first shortcode would select the audio file and render it into a player on the page, followed by several buttons which would have links with encoded arguments, the recipient page would decode the arguments and report the result, keep score for that user etc.
Suggest that you download and browse various plugins to learn how to do your stuff.
Forum: Localhost Installs
In reply to: LAMP – Ubuntu 20.04 – Can’t select databaseMay I offer some tips:
– the package: phpmyadmin
is almost essential, it gives you a gui browser view into your mysql setup, configuration, databases and all. It will for instance show you if your database exists, what tables and contents it has etc.
– you are using the same name “wordpress01” for both your database and WordPress directory, this could lead to unfortunate confusion.Forum: Localhost Installs
In reply to: Connect to WP on RPI from Internet with IPJust out of curiosity, I’m not planning to do this but hey…. if I where to put http://w.x.y.z as the blogs name, could I then connect to it from the internet by just typing its IP addressee?
Yes, if you set your site address and WordPress address to “http://w.x.y.z” you could then access the website from the internet using “http://w.x.y.z/”
However:
– It would only work so long as your ISP kept your connection on the same IP
– It would probably not work on your LAN or on the RaPi, the connection would need to go out to your modem and then come back, maybe the router would understand this wrong sided access, maybe not.If you are happy with your result, please mark this thread as resolved.
Forum: Localhost Installs
In reply to: Connect to WP on RPI from Internet with IPI think you are mostly on the correct track.
First I think you already have configured the apache2 server on the RaPi to use the virtualhost method where the site is accessed by name rather than some variation of “localhost”, details here: https://httpd.apache.org/docs/current/vhosts/name-based.html
Say the name you are using is: “decausmafamilyblog.com”, this name need not be registered, it could be the name you will register if required, it does not need to be registered because you are not using the DNS system to resolve it.
Say that the RaPi has a local network IP address of: 192.168.0.21Then
– in the WordPress configurtion your site address and wordpress address would be:
http://decausmafamilyblog.com
– in the file “/etc/hosts” on the rapi you would have this line:
127.0.0.1 decausmafamilyblog.com
A browser on the rapi can access your website.
– On your local LAN each computer can access the website by having this line in its “hosts” file
192.168.0.21 decausmafamilyblog.com
– In your modem/router you configure port forwarding to the RaPi
– Any computer on the wider internet can access the website by having this line in its “hosts” file:
w.x.y.z decausmafamilyblog.comNow when accessing your website from any of the computers mentioned above, you just enter this in the browser’s address bar:
http://decausmafamilyblog.com
The browser is able to access the RaPi.
As part of the page delivered will be network addresses to access the CSS files and images etc. They will be lines like:<link rel="stylesheet" href="http://decausmafamilyblog.com/wp-content/themes/atheme/style.css" type="text/css" media="all">
Each hosts file tells the browser how to get to the RaPi using whichever network connection is relevant.- This reply was modified 5 years, 5 months ago by RossMitchell.